Skip to content

Commit

Permalink
changes the test so echo is not used before Nim is init
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Aug 6, 2023
1 parent 6e6a45b commit 4f3d927
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/cpp/tmember.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ destructing
destructing
'''
"""
proc print(s: cstring) {.importcpp:"printf(@)", header:"<stdio.h>".}

type
Foo {.exportc.} = object
Expand All @@ -16,8 +17,8 @@ type
proc memberProc(f: Foo) {.exportc, member.} =
echo $f.test

proc destructor(f: Foo) {.member: "~'1()".} =
echo "destructing"
proc destructor(f: Foo) {.member: "~'1()", used.} =
print "destructing\n"

proc `==`(self, other: Foo): bool {.member:"operator==('2 const & #2) const -> '0"} =
self.test == other.test
Expand Down

0 comments on commit 4f3d927

Please sign in to comment.