#include #include #include #include #include #include #include #include #include #include "proftest.h" void sends_room_join(void **state) { prof_connect(); prof_input("/join testroom@conference.localhost"); assert_true(stbbr_last_received( "" "" "" "" )); } void sends_room_join_with_nick(void **state) { prof_connect(); prof_input("/join testroom@conference.localhost nick testnick"); assert_true(stbbr_last_received( "" "" "" "" )); } void sends_room_join_with_password(void **state) { prof_connect(); prof_input("/join testroom@conference.localhost password testpassword"); assert_true(stbbr_last_received( "" "" "testpassword" "" "" "" )); } void sends_room_join_with_nick_and_password(void **state) { prof_connect(); prof_input("/join testroom@conference.localhost nick testnick password testpassword"); assert_true(stbbr_last_received( "" "" "testpassword" "" "" "" )); } void shows_role_and_affiliation_on_join(void **state) { prof_connect(); stbbr_for_id("prof_join_4", "" "" "" "" "" "" "" ); prof_input("/join testroom@conference.localhost"); assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); } void shows_subject_on_join(void **state) { prof_connect(); stbbr_for_id("prof_join_4", "" "" "" "" "" "" "" ); prof_input("/join testroom@conference.localhost"); assert_true(prof_output_exact("-> You have joined the room as stabber, role: participant, affiliation: none")); stbbr_send( "" "Test room subject" "anothernick has set the subject to: Test
discard """
  errormsg: "type mismatch: got <ptr Hard[system.string]> but expected 'Book[system.string]'"
  file: "tarraycons_ptr_generic2.nim"
  line: 17
"""

type
  Book[T] = ref object of RootObj
    cover: T
  Hard[T] = ref object of Book[T]
  Soft[T] = ref object of Book[T]

var bn = Book[string](cover: "none")
var hs = Hard[string](cover: "skin")
var bp = Soft