Skip to content

Commit e4efcea

Browse files
committed
fbc-tests: add test for class assignment operator (let)
1 parent f19bfb1 commit e4efcea

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/cpp/class-fbc.bas

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ scope
116116
assert( b.value = 2 )
117117
end scope
118118

119+
DLOG( operator UDT.let( byref rhs as const UDT ) )
120+
scope
121+
dim a as UDT = 2
122+
dim b as UDT
123+
resetChecks()
124+
b = a
125+
checkResults( @b, @a, 0, 2, 2, "UDT& UDT::operator=( UDT const& rhs )" )
126+
assert( b.value = 2 )
127+
end scope
128+
129+
119130
'' disable results for ctor/dtor/copy-ctor/let
120131
setInitial( 0 )
121132

0 commit comments

Comments
 (0)