Skip to content

Commit

Permalink
Add more default values in test
Browse files Browse the repository at this point in the history
  • Loading branch information
aziemchawdhary-gs committed Jun 4, 2024
1 parent eb7ef19 commit a9a56c8
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,23 @@ public void testReactivateNewDefaultValues()
"Class test::A\n" +
"{\n" +
" a:Boolean[1] = true;\n" +
" i:Integer[1] = 10;\n" +
" enumProperty:EnumWithDefault[1] = test::EnumWithDefault.DefaultValue;\n" +
"}\n" +
"\n" +
"Enum test::EnumWithDefault\n" +
"{\n" +
" DefaultValue,\n" +
" AnotherValue\n" +
"}\n" +
"\n" +
"function test::f():Boolean[1]\n" +
"{\n" +
" let l = {| ^test::A()};\n" +
" let a = $l.expressionSequence->evaluateAndDeactivate()->toOne()->reactivate()->cast(@test::A)->toOne();\n" +
" assert($a.a, | '');\n" +
" assert($a.a, | 'Default value for property a set to wrong value');\n" +
" assertEquals($a.i, 10);\n" +
" assertEquals($a.enumProperty, test::EnumWithDefault.DefaultValue);\n" +
"}\n");
execute("test::f():Boolean[1]");
}
Expand Down

0 comments on commit a9a56c8

Please sign in to comment.