Added unit tests for #768

master
krzys-h 2016-04-19 21:09:41 +02:00
parent 54a34a9b22
commit 7c551dc39d
1 changed files with 24 additions and 0 deletions

View File

@ -647,6 +647,18 @@ TEST_F(CBotUT, FunctionRedefined)
"}\n",
CBotErrRedefFunc
);
ExecuteTest(
"int func(int[] test)\n"
"{\n"
" return 1;\n"
"}\n"
"int func(int[] test)\n"
"{\n"
" return 2;\n"
"}\n",
CBotErrRedefFunc
);
}
// TODO: Doesn't work
@ -845,6 +857,18 @@ TEST_F(CBotUT, ClassMethodRedefined)
"}\n",
CBotErrRedefFunc
);
ExecuteTest(
"public class TestClass {\n"
" public int test(int[] test) {\n"
" return 1;\n"
" }\n"
" public int test(int[] test) {\n"
" return 2;\n"
" }\n"
"}\n",
CBotErrRedefFunc
);
}
// TODO: Not only doesn't work but segfaults