raze/polymer/eduke32/source/lunatic/test/nlcf_break.con
helixhorned d909173065 Lunatic t.: allow hex literals with >9 digits if the high ones are all 'F's.
(Or '0's, but that case is handled automatically.) The resulting generated
number is taken by looking at the 8 lower nibbles and interpreting them as
a signed 32-bit integer.
Also add some number parsing tests to test/nlcf_break.con.

git-svn-id: https://svn.eduke32.com/eduke32@3571 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-17 18:11:53 +00:00

44 lines
930 B
Text

// NOTE: This file is misnamed, "break" is local control flow, of course.
state teststate_break
ifvare 1 1
{
redefinequote 114 BEFORE
echo 114
break
redefinequote 114 AFTER
echo 114
}
redefinequote 114 STILL LIVE INNER
echo 114
ends
onevent EVENT_INIT
state teststate_break
redefinequote 114 STILL LIVE OUTER
echo 114
endevent
// Test number parsing
gamevar MINUS_ONE -1 0
gamevar INT32_MIN 0x80000000 0
gamevar INT32_MIN_ -0x80000000 0
gamevar INT32_MINh 0x80000000h 0
gamevar INT32_MIN_h -0x80000000h 0
gamevar INT32_MIN_P1 0x80000001 0
gamevar INT32_MIN_P1h 0x80000001h 0
//gamevar INT32_MAX_ -0x80000001 0 // error
gamevar INT32_MAX 0x7fffffff 0
gamevar INT32_MAXh 0x7fffffffh 0
// 9 digits? truncate it, but only because there's an F there.
gamevar SOMEHEX 0xFFEFC0001 0
// This one throws an error:
//gamevar BADHEX 0xBFEFC0001 0