Match unit test to Morrowind.exe behaviour

depth-refraction
Evil Eye 2 years ago
parent 868a398b86
commit 724c6ec425

@ -180,8 +180,8 @@ End)mwscript";
short a short a
short b short b
short eq short eq
short gte short gt
short lte short lt
short ne short ne
set eq to 0 set eq to 0
@ -192,20 +192,20 @@ if ( a = = b )
set eq to ( eq + 1 ) set eq to ( eq + 1 )
endif endif
set gte to 0 set gt to 0
if ( a >= b ) if ( a > b )
set gte to ( gte + 1 ) set gt to ( gt + 1 )
endif endif
if ( a > = b ) if ( a > = b )
set gte to ( gte + 1 ) set gt to ( gt + 1 )
endif endif
set lte to 0 set lt to 0
if ( a <= b ) if ( a < b )
set lte to ( lte + 1 ) set lt to ( lt + 1 )
endif endif
if ( a < = b ) if ( a < = b )
set lte to ( lte + 1 ) set lt to ( lt + 1 )
endif endif
set ne to 0 set ne to 0
@ -627,8 +627,8 @@ End)mwscript";
context.setLocalShort(1, b); context.setLocalShort(1, b);
run(*script, context); run(*script, context);
EXPECT_EQ(context.getLocalShort(2), a == b ? 2 : 0); EXPECT_EQ(context.getLocalShort(2), a == b ? 2 : 0);
EXPECT_EQ(context.getLocalShort(3), a >= b ? 2 : 0); EXPECT_EQ(context.getLocalShort(3), a > b ? 2 : 0);
EXPECT_EQ(context.getLocalShort(4), a <= b ? 2 : 0); EXPECT_EQ(context.getLocalShort(4), a < b ? 2 : 0);
EXPECT_EQ(context.getLocalShort(5), a != b ? 2 : 0); EXPECT_EQ(context.getLocalShort(5), a != b ? 2 : 0);
} }
} }

Loading…
Cancel
Save