mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
add pool-test
This commit is contained in:
parent
cfe7125d58
commit
0f137eb528
2
port/linux/.vscode/launch.json
vendored
2
port/linux/.vscode/launch.json
vendored
@ -14,7 +14,7 @@
|
|||||||
// "--gtest_filter=queue*"
|
// "--gtest_filter=queue*"
|
||||||
// "--gtest_filter=parser*"
|
// "--gtest_filter=parser*"
|
||||||
// "--gtest_filter=args*",
|
// "--gtest_filter=args*",
|
||||||
"--gtest_filter=content*",
|
// "--gtest_filter=content*",
|
||||||
// "--gtest_filter=object_test.printa",
|
// "--gtest_filter=object_test.printa",
|
||||||
// "--gtest_filter=object_test*",
|
// "--gtest_filter=object_test*",
|
||||||
// "--gtest_filter=stack*",
|
// "--gtest_filter=stack*",
|
||||||
|
14
port/linux/test/pool-test.cpp
Normal file
14
port/linux/test/pool-test.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "gtest/gtest.h"
|
||||||
|
extern "C" {
|
||||||
|
#include "dataArg.h"
|
||||||
|
#include "dataMemory.h"
|
||||||
|
#include "dataString.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(pool, init) {
|
||||||
|
Pool p = pool_init(125, 4);
|
||||||
|
EXPECT_EQ(p.aline, 4);
|
||||||
|
EXPECT_EQ(p.size, 128);
|
||||||
|
pool_deinit(&p);
|
||||||
|
EXPECT_EQ((uint64_t)p.mem, NULL);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user