Skip to content

Commit

Permalink
all test ok
Browse files Browse the repository at this point in the history
  • Loading branch information
lyon committed Aug 31, 2021
1 parent 33ac945 commit a9fc248
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"program": "${workspaceFolder}/build/src/test/pikascript_test",
"args": [
"--gtest_filter=strs*"
"--gtest_filter=args.buff"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
Expand Down
2 changes: 1 addition & 1 deletion src/package/pikascript/pikascript-core
30 changes: 15 additions & 15 deletions src/test/args-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extern "C"
#include "dataString.h"
}
static int mem;
TEST(args_test, test1)
TEST(args, test1)
{
mem = pikaMemNow();
Args *args = New_args(NULL);
Expand All @@ -16,7 +16,7 @@ TEST(args_test, test1)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test4)
TEST(args, test4)
{
int32_t testint = 12333;
Args *args = New_args(NULL);
Expand All @@ -26,7 +26,7 @@ TEST(args_test, test4)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test2)
TEST(args, test2)
{
Args *args = New_args(NULL);
float floatOut = 0;
Expand All @@ -51,7 +51,7 @@ TEST(args_test, test2)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test3)
TEST(args, test3)
{
Args *args1 = New_args(NULL);
Args *args2 = New_args(NULL);
Expand All @@ -67,15 +67,15 @@ TEST(args_test, test3)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, buff)
TEST(args, buff)
{
Args *buffs = New_args(NULL);
char *buff = args_getBuff(buffs, 256);
args_deinit(buffs);
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, print_int)
TEST(args, print_int)
{
Args *args = New_args(NULL);
args_setInt(args, (char *)"testInt", 124);
Expand All @@ -84,7 +84,7 @@ TEST(args_test, print_int)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test5)
TEST(args, test5)
{
int32_t testInt = 124;
Args *args = New_args(NULL);
Expand All @@ -96,15 +96,15 @@ TEST(args_test, test5)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test6)
TEST(args, test6)
{
Args *args = New_args(NULL);
args_setFloat(args, (char *)"testfloat", 1.42);
EXPECT_TRUE(strEqu((char *)"1.420000", args_print(args, (char *)"testfloat")));
args_deinit(args);
EXPECT_EQ(pikaMemNow(), 0);
}
TEST(args_test, test7)
TEST(args, test7)
{
Args *args = New_args(NULL);
float floatBindTest = 2.314;
Expand All @@ -114,7 +114,7 @@ TEST(args_test, test7)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test8)
TEST(args, test8)
{
Args *args = New_args(NULL);
args_setStr(args, (char *)"testString", (char *)"test string print");
Expand All @@ -123,7 +123,7 @@ TEST(args_test, test8)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test9)
TEST(args, test9)
{
Args *args = New_args(NULL);
char strBindTest[] = "test string bind";
Expand All @@ -133,7 +133,7 @@ TEST(args_test, test9)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test10)
TEST(args, test10)
{
Args *args = New_args(NULL);
args_setInt(args, (char *)"testInt", 1);
Expand All @@ -146,7 +146,7 @@ TEST(args_test, test10)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test11)
TEST(args, test11)
{
Args *args = New_args(NULL);
char testStrBind[256] = "testtest";
Expand All @@ -160,7 +160,7 @@ TEST(args_test, test11)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, test12)
TEST(args, test12)
{
Args *args = New_args(NULL);
args_setInt(args, (char *)"test", 13);
Expand All @@ -174,7 +174,7 @@ TEST(args_test, test12)
EXPECT_EQ(pikaMemNow(), 0);
}

TEST(args_test, mem)
TEST(args, mem)
{
EXPECT_EQ(pikaMemNow(), mem);
EXPECT_EQ(pikaMemNow(), 0);
Expand Down

0 comments on commit a9fc248

Please sign in to comment.