Пример #1
0
TEST(StringTest, ToIntegerOctTest)
{
	SOURCE_TEST_INT(0123, "\"0123\".toInteger();");
}
Пример #2
0
TEST(StringTest, ToIntegerTest)
{
	SOURCE_TEST_INT(123, "\"123\".toInteger();");
}
Пример #3
0
TEST(StringTest, ToIntegerHexTest)
{
	SOURCE_TEST_INT(0x123, "\"0x123\".toInteger();");
}
Пример #4
0
TEST_F(DonutForTest, ForWhileTest)
{
	SOURCE_TEST_INT(10, "var cnt=0;var i=0;for(;i<10;){++i;cnt+=1;};");
}
Пример #5
0
TEST_F(DonutForTest, WhileTest)
{
	SOURCE_TEST_INT(10, "var cnt=0;var i=0;while(i<10){++i;cnt+=1;};");
}
Пример #6
0
TEST_F(DonutForTest, ZeroCountTest)
{
	SOURCE_TEST_INT(-12, "var cnt=10;for(var i=-12;i>0;++i){cnt+=1;};");
}
Пример #7
0
TEST_F(DonutForTest, CountTest)
{
	SOURCE_TEST_INT(10, "var cnt=0;for(var i=0;i<10;++i){cnt+=1;};");
}
Пример #8
0
TEST(FloatTest, IntCastTest)
{
	SOURCE_TEST_INT(12, "(12.34).toInteger();");
}