Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita73b230

Browse files
committed
Updated unit tests
1 parent95b1858 commita73b230

File tree

3 files changed

+6
-26
lines changed

3 files changed

+6
-26
lines changed

‎buildcc/lib/args/mock/test_args.h‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎buildcc/lib/args/test/test_args.cpp‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include"args/args.h"
22

3-
#include"test_args.h"
4-
53
// NOTE, Make sure all these includes are AFTER the system and header includes
64
#include"CppUTest/CommandLineTestRunner.h"
75
#include"CppUTest/MemoryLeakDetectorNewMacros.h"
@@ -12,8 +10,7 @@
1210
TEST_GROUP(ArgsTestGroup)
1311
{
1412
voidteardown() {
15-
buildcc::m::ArgsDeinit();
16-
buildcc::Args::Ref().clear();
13+
buildcc::Args::Deinit();
1714
}
1815
};
1916
// clang-format on
@@ -23,7 +20,6 @@ TEST(ArgsTestGroup, Args_BasicParse) {
2320
std::vector<constchar *> av{"","--config","configs/basic_parse.toml"};
2421
int argc = av.size();
2522

26-
// buildcc::Args::Init();
2723
buildcc::Args::Init();
2824
buildcc::Args::Parse(argc, av.data());
2925

@@ -268,6 +264,6 @@ TEST(ArgsTestGroup, Args_MultipleCustomTarget) {
268264
}
269265

270266
intmain(int ac,char **av) {
271-
MemoryLeakWarningPlugin::turnOffNewDeleteOverloads();
267+
MemoryLeakWarningPlugin::destroyGlobalDetector();
272268
returnCommandLineTestRunner::RunAllTests(ac, av);
273269
}

‎buildcc/lib/args/test/test_register.cpp‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include"args/register.h"
22

3-
#include"test_args.h"
4-
53
#include"expect_command.h"
64

75
#include"mock_command_copier.h"
@@ -17,7 +15,7 @@
1715
TEST_GROUP(RegisterTestGroup)
1816
{
1917
voidteardown() {
20-
buildcc::m::ArgsDeinit();
18+
buildcc::Args::Deinit();
2119
mock().clear();
2220
}
2321
};
@@ -54,7 +52,7 @@ TEST(RegisterTestGroup, Register_Clean) {
5452
buildcc::Register reg;
5553
mock().expectOneCall("CleanCb");
5654
reg.Clean([]() {mock().actualCall("CleanCb"); });
57-
buildcc::m::ArgsDeinit();
55+
buildcc::Args::Deinit();
5856
}
5957

6058
{
@@ -77,7 +75,7 @@ TEST(RegisterTestGroup, Register_Clean) {
7775

7876
buildcc::Register reg;
7977
reg.Clean([]() {mock().actualCall("CleanCb"); });
80-
buildcc::m::ArgsDeinit();
78+
buildcc::Args::Deinit();
8179
}
8280

8381
mock().checkExpectations();
@@ -686,7 +684,7 @@ TEST(RegisterTestGroup, Register_TestWithOutput) {
686684
}
687685

688686
intmain(int ac,char **av) {
689-
MemoryLeakWarningPlugin::turnOffNewDeleteOverloads();
687+
MemoryLeakWarningPlugin::destroyGlobalDetector();
690688
buildcc::env::m::VectorStringCopier copier;
691689
mock().installCopier(TEST_VECTOR_STRING_TYPE, copier);
692690
returnCommandLineTestRunner::RunAllTests(ac, av);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp