TEST(StringTest, ToIntegerOctTest) { SOURCE_TEST_INT(0123, "\"0123\".toInteger();"); }
TEST(StringTest, ToIntegerTest) { SOURCE_TEST_INT(123, "\"123\".toInteger();"); }
TEST(StringTest, ToIntegerHexTest) { SOURCE_TEST_INT(0x123, "\"0x123\".toInteger();"); }
TEST_F(DonutForTest, ForWhileTest) { SOURCE_TEST_INT(10, "var cnt=0;var i=0;for(;i<10;){++i;cnt+=1;};"); }
TEST_F(DonutForTest, WhileTest) { SOURCE_TEST_INT(10, "var cnt=0;var i=0;while(i<10){++i;cnt+=1;};"); }
TEST_F(DonutForTest, ZeroCountTest) { SOURCE_TEST_INT(-12, "var cnt=10;for(var i=-12;i>0;++i){cnt+=1;};"); }
TEST_F(DonutForTest, CountTest) { SOURCE_TEST_INT(10, "var cnt=0;for(var i=0;i<10;++i){cnt+=1;};"); }
TEST(FloatTest, IntCastTest) { SOURCE_TEST_INT(12, "(12.34).toInteger();"); }