Skip to content

Commit ca77dd8

Browse files
committed
Modified scripts generate_test_files.bat.in and generate_test_files.sh.in to generate files in C and added them to project bin2cpp_unittest to check that generated C code is compilable.
1 parent be7e394 commit ca77dd8

File tree

5 files changed

+225
-2
lines changed

5 files changed

+225
-2
lines changed

src/bin2cpp/BaseGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ namespace bin2cpp
476476
fprintf(header, "} %s;\n", mContext.baseClass.c_str());
477477
fprintf(header, "typedef %s* %sPtr;\n", mContext.baseClass.c_str(), mContext.baseClass.c_str());
478478
fprintf(header, "#endif //%s_EMBEDDEDFILE_STRUCT\n", classMacroGuardPrefix.c_str());
479-
fprintf(header, "%s* %s();\n", mContext.baseClass.c_str(), getGetterFunctionName().c_str());
479+
fprintf(header, "%s* %s(void);\n", mContext.baseClass.c_str(), getGetterFunctionName().c_str());
480480
fprintf(header, "\n");
481481
fprintf(header, "#endif //%s\n", macroGuard.c_str());
482482

test/bin2cpp_unittest/CMakeLists.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ include_directories(${GENERATED_TEST_FILES_DIR}) # for TestExtraction.cpp
77
# These are required because each generated cpp file is including its header file
88
# without using the parent directory.
99
include_directories(${GENERATED_TEST_FILES_DIR}/testBaseClass)
10+
include_directories(${GENERATED_TEST_FILES_DIR}/testBaseClass_C)
1011
include_directories(${GENERATED_TEST_FILES_DIR}/testDir01/sources)
1112
include_directories(${GENERATED_TEST_FILES_DIR}/testEncodingHex)
1213
include_directories(${GENERATED_TEST_FILES_DIR}/testEncodingOct)
1314
include_directories(${GENERATED_TEST_FILES_DIR}/testFileManager)
15+
include_directories(${GENERATED_TEST_FILES_DIR}/testFileManager_C)
1416
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorArray10000)
17+
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorArray10000_C)
1518
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorSegment10000)
19+
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorSegment10000_C)
1620
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorString10000)
21+
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorString10000_C)
1722
if (WIN32)
1823
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorWin32)
24+
include_directories(${GENERATED_TEST_FILES_DIR}/testGeneratorWin32_C)
1925
endif()
2026
include_directories(${GENERATED_TEST_FILES_DIR}/testHtml100000)
2127
include_directories(${GENERATED_TEST_FILES_DIR}/testIssue12)
@@ -28,6 +34,7 @@ include_directories(${GENERATED_TEST_FILES_DIR}/testIssue56b/generated_sources)
2834
include_directories(${GENERATED_TEST_FILES_DIR}/testIssue56c/generated_sources)
2935
include_directories(${GENERATED_TEST_FILES_DIR}/testKeepDirectories)
3036
include_directories(${GENERATED_TEST_FILES_DIR}/testNamespace)
37+
include_directories(${GENERATED_TEST_FILES_DIR}/testNamespace_C)
3138
include_directories(${GENERATED_TEST_FILES_DIR}/testRandom1)
3239
include_directories(${GENERATED_TEST_FILES_DIR}/testRandom2)
3340
include_directories(${GENERATED_TEST_FILES_DIR}/testRandom3)
@@ -48,6 +55,8 @@ include_directories(${GENERATED_TEST_FILES_DIR}/testText100000)
4855
set(GENERATED_TEST_FILES
4956
${GENERATED_TEST_FILES_DIR}/testBaseClass/_testBaseClass.h
5057
${GENERATED_TEST_FILES_DIR}/testBaseClass/_testBaseClass.cpp
58+
${GENERATED_TEST_FILES_DIR}/testBaseClass_C/_testBaseClass_C.h
59+
${GENERATED_TEST_FILES_DIR}/testBaseClass_C/_testBaseClass_C.c
5160
${GENERATED_TEST_FILES_DIR}/testEncodingHex/_testEncodingHex.h
5261
${GENERATED_TEST_FILES_DIR}/testEncodingHex/_testEncodingHex.cpp
5362
${GENERATED_TEST_FILES_DIR}/testEncodingOct/_testEncodingOct.h
@@ -58,6 +67,12 @@ set(GENERATED_TEST_FILES
5867
${GENERATED_TEST_FILES_DIR}/testGeneratorSegment10000/_testGeneratorSegment10000.cpp
5968
${GENERATED_TEST_FILES_DIR}/testGeneratorString10000/_testGeneratorString10000.h
6069
${GENERATED_TEST_FILES_DIR}/testGeneratorString10000/_testGeneratorString10000.cpp
70+
${GENERATED_TEST_FILES_DIR}/testGeneratorArray10000_C/_testGeneratorArray10000_C.h
71+
${GENERATED_TEST_FILES_DIR}/testGeneratorArray10000_C/_testGeneratorArray10000_C.c
72+
${GENERATED_TEST_FILES_DIR}/testGeneratorSegment10000_C/_testGeneratorSegment10000_C.h
73+
${GENERATED_TEST_FILES_DIR}/testGeneratorSegment10000_C/_testGeneratorSegment10000_C.c
74+
${GENERATED_TEST_FILES_DIR}/testGeneratorString10000_C/_testGeneratorString10000_C.h
75+
${GENERATED_TEST_FILES_DIR}/testGeneratorString10000_C/_testGeneratorString10000_C.c
6176
${GENERATED_TEST_FILES_DIR}/testHtml100000/_testHtml100000.h
6277
${GENERATED_TEST_FILES_DIR}/testHtml100000/_testHtml100000.cpp
6378
${GENERATED_TEST_FILES_DIR}/testIssue12/_testIssue12.h
@@ -110,6 +125,8 @@ set(GENERATED_TEST_FILES
110125
${GENERATED_TEST_FILES_DIR}/testIssue56c/generated_sources/index_5.h
111126
${GENERATED_TEST_FILES_DIR}/testNamespace/_testNamespace.h
112127
${GENERATED_TEST_FILES_DIR}/testNamespace/_testNamespace.cpp
128+
${GENERATED_TEST_FILES_DIR}/testNamespace_C/_testNamespace_C.h
129+
${GENERATED_TEST_FILES_DIR}/testNamespace_C/_testNamespace_C.c
113130
${GENERATED_TEST_FILES_DIR}/testRandom1/_testRandom1.h
114131
${GENERATED_TEST_FILES_DIR}/testRandom1/_testRandom1.cpp
115132
${GENERATED_TEST_FILES_DIR}/testRandom2/_testRandom2.h
@@ -142,6 +159,12 @@ set(GENERATED_TEST_FILES
142159
${GENERATED_TEST_FILES_DIR}/testFileManager/_testFileManager.2.cpp
143160
${GENERATED_TEST_FILES_DIR}/testFileManager/FileManager.h
144161
${GENERATED_TEST_FILES_DIR}/testFileManager/FileManager.cpp
162+
${GENERATED_TEST_FILES_DIR}/testFileManager_C/_testFileManager_C.1.h
163+
${GENERATED_TEST_FILES_DIR}/testFileManager_C/_testFileManager_C.1.c
164+
${GENERATED_TEST_FILES_DIR}/testFileManager_C/_testFileManager_C.2.h
165+
${GENERATED_TEST_FILES_DIR}/testFileManager_C/_testFileManager_C.2.c
166+
${GENERATED_TEST_FILES_DIR}/testFileManager_C/FileManager.h
167+
${GENERATED_TEST_FILES_DIR}/testFileManager_C/FileManager.c
145168
${GENERATED_TEST_FILES_DIR}/testDir01/sources/_img0001.h
146169
${GENERATED_TEST_FILES_DIR}/testDir01/sources/_img0002.h
147170
${GENERATED_TEST_FILES_DIR}/testDir01/sources/_img0003.h
@@ -177,6 +200,9 @@ if (WIN32)
177200
${GENERATED_TEST_FILES_DIR}/testGeneratorWin32/_testGeneratorWin32.h
178201
${GENERATED_TEST_FILES_DIR}/testGeneratorWin32/_testGeneratorWin32.cpp
179202
${GENERATED_TEST_FILES_DIR}/testGeneratorWin32/_testGeneratorWin32.rc
203+
${GENERATED_TEST_FILES_DIR}/testGeneratorWin32_C/_testGeneratorWin32_C.h
204+
${GENERATED_TEST_FILES_DIR}/testGeneratorWin32_C/_testGeneratorWin32_C.c
205+
${GENERATED_TEST_FILES_DIR}/testGeneratorWin32_C/_testGeneratorWin32_C.rc
180206
)
181207
endif()
182208

test/bin2cpp_unittest/TestExtraction.cpp

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@
6969
#undef BIN2CPP_EMBEDDEDFILE_CLASS
7070
#include "testBaseClass/_testBaseClass.h"
7171

72+
extern "C"
73+
{
74+
#include "testGeneratorArray10000_C/_testGeneratorArray10000_C.h"
75+
#include "testGeneratorSegment10000_C/_testGeneratorSegment10000_C.h"
76+
#include "testGeneratorString10000_C/_testGeneratorString10000_C.h"
77+
#ifdef _WIN32
78+
#include "testGeneratorWin32_C/_testGeneratorWin32_C.h"
79+
#endif
80+
#include "testNamespace_C/_testNamespace_C.h"
81+
#include "testBaseClass_C/_testBaseClass_C.h"
82+
}
83+
7284
extern const std::string & gGeneratedFilesDir;
7385

7486
namespace TestExtractionUtils
@@ -330,6 +342,21 @@ TEST_F(TestExtraction, testGeneratorArray10000)
330342
ASSERT_TRUE(equal) << reason.c_str();
331343
}
332344

345+
TEST_F(TestExtraction, testGeneratorArray10000_C)
346+
{
347+
static const std::string expectedFilePath = getExpectedFilePath();
348+
static const std::string outputFilePath = getActualFilePath();
349+
350+
Bin2cFile* file = bin2c_get_file_testgeneratorarray10000_c();
351+
bool extractSuccess = file->save(outputFilePath.c_str());
352+
ASSERT_TRUE(extractSuccess);
353+
354+
//assert binary content is the same
355+
std::string reason;
356+
bool equal = ra::testing::IsFileEquals(expectedFilePath.c_str(), outputFilePath.c_str(), reason);
357+
ASSERT_TRUE(equal) << reason.c_str();
358+
}
359+
333360
TEST_F(TestExtraction, testGeneratorSegment10000)
334361
{
335362
static const std::string expectedFilePath = getExpectedFilePath();
@@ -345,6 +372,21 @@ TEST_F(TestExtraction, testGeneratorSegment10000)
345372
ASSERT_TRUE(equal) << reason.c_str();
346373
}
347374

375+
TEST_F(TestExtraction, testGeneratorSegment10000_C)
376+
{
377+
static const std::string expectedFilePath = getExpectedFilePath();
378+
static const std::string outputFilePath = getActualFilePath();
379+
380+
const Bin2cFile* file = bin2c_get_file_testgeneratorsegment10000_c();
381+
bool extractSuccess = file->save(outputFilePath.c_str());
382+
ASSERT_TRUE(extractSuccess);
383+
384+
//assert binary content is the same
385+
std::string reason;
386+
bool equal = ra::testing::IsFileEquals(expectedFilePath.c_str(), outputFilePath.c_str(), reason);
387+
ASSERT_TRUE(equal) << reason.c_str();
388+
}
389+
348390
TEST_F(TestExtraction, testGeneratorString10000)
349391
{
350392
static const std::string expectedFilePath = getExpectedFilePath();
@@ -360,6 +402,21 @@ TEST_F(TestExtraction, testGeneratorString10000)
360402
ASSERT_TRUE(equal) << reason.c_str();
361403
}
362404

405+
TEST_F(TestExtraction, testGeneratorString10000_C)
406+
{
407+
static const std::string expectedFilePath = getExpectedFilePath();
408+
static const std::string outputFilePath = getActualFilePath();
409+
410+
const Bin2cFile* file = bin2c_get_file_testgeneratorstring10000_c();
411+
bool extractSuccess = file->save(outputFilePath.c_str());
412+
ASSERT_TRUE(extractSuccess);
413+
414+
//assert binary content is the same
415+
std::string reason;
416+
bool equal = ra::testing::IsFileEquals(expectedFilePath.c_str(), outputFilePath.c_str(), reason);
417+
ASSERT_TRUE(equal) << reason.c_str();
418+
}
419+
363420
#ifdef _WIN32
364421
TEST_F(TestExtraction, testGeneratorWin32)
365422
{
@@ -375,6 +432,21 @@ TEST_F(TestExtraction, testGeneratorWin32)
375432
bool equal = ra::testing::IsFileEquals(expectedFilePath.c_str(), outputFilePath.c_str(), reason);
376433
ASSERT_TRUE(equal) << reason.c_str();
377434
}
435+
436+
TEST_F(TestExtraction, testGeneratorWin32_C)
437+
{
438+
static const std::string expectedFilePath = getExpectedFilePath();
439+
static const std::string outputFilePath = getActualFilePath();
440+
441+
const Bin2cFile* file = bin2c_get_file_testgeneratorwin32_c();
442+
bool extractSuccess = file->save(outputFilePath.c_str());
443+
ASSERT_TRUE(extractSuccess);
444+
445+
//assert binary content is the same
446+
std::string reason;
447+
bool equal = ra::testing::IsFileEquals(expectedFilePath.c_str(), outputFilePath.c_str(), reason);
448+
ASSERT_TRUE(equal) << reason.c_str();
449+
}
378450
#endif
379451

380452
TEST_F(TestExtraction, testEncodingOct)
@@ -422,6 +494,21 @@ TEST_F(TestExtraction, testNamespace)
422494
ASSERT_TRUE(equal) << reason.c_str();
423495
}
424496

497+
TEST_F(TestExtraction, testNamespace_C)
498+
{
499+
static const std::string expectedFilePath = getExpectedFilePath();
500+
static const std::string outputFilePath = getActualFilePath();
501+
502+
const Bin2cFile2* file = foobar_get_file_testnamespace_c();
503+
bool extractSuccess = file->save(outputFilePath.c_str());
504+
ASSERT_TRUE(extractSuccess);
505+
506+
//assert binary content is the same
507+
std::string reason;
508+
bool equal = ra::testing::IsFileEquals(expectedFilePath.c_str(), outputFilePath.c_str(), reason);
509+
ASSERT_TRUE(equal) << reason.c_str();
510+
}
511+
425512
TEST_F(TestExtraction, testBaseClass)
426513
{
427514
static const std::string expectedFilePath = getExpectedFilePath();
@@ -437,6 +524,21 @@ TEST_F(TestExtraction, testBaseClass)
437524
ASSERT_TRUE(equal) << reason.c_str();
438525
}
439526

527+
TEST_F(TestExtraction, testBaseClass_C)
528+
{
529+
static const std::string expectedFilePath = getExpectedFilePath();
530+
static const std::string outputFilePath = getActualFilePath();
531+
532+
const Resource* file = tbc_get_file_testbaseclass_c();
533+
bool extractSuccess = file->save(outputFilePath.c_str());
534+
ASSERT_TRUE(extractSuccess);
535+
536+
//assert binary content is the same
537+
std::string reason;
538+
bool equal = ra::testing::IsFileEquals(expectedFilePath.c_str(), outputFilePath.c_str(), reason);
539+
ASSERT_TRUE(equal) << reason.c_str();
540+
}
541+
440542
TEST_F(TestExtraction, testIssue12)
441543
{
442544
static const std::string expectedFilePath = getExpectedFilePath();

test/bin2cpp_unittest/generate_test_files.bat.in

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,41 +121,83 @@ mkdir %OUTDIR% 1>NUL 2>NUL
121121
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=array --override
122122
if %errorlevel% neq 0 exit /b %errorlevel%
123123

124+
set TEST_NAME=testGeneratorArray10000_C
125+
set OUTDIR=.\generated_files\%TEST_NAME%
126+
mkdir %OUTDIR% 1>NUL 2>NUL
127+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
128+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=array --override --code=c
129+
if %errorlevel% neq 0 exit /b %errorlevel%
130+
124131
set TEST_NAME=testGeneratorString10000
125132
set OUTDIR=.\generated_files\%TEST_NAME%
126133
mkdir %OUTDIR% 1>NUL 2>NUL
127134
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
128135
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=string --override
129136
if %errorlevel% neq 0 exit /b %errorlevel%
130137

138+
set TEST_NAME=testGeneratorString10000_C
139+
set OUTDIR=.\generated_files\%TEST_NAME%
140+
mkdir %OUTDIR% 1>NUL 2>NUL
141+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
142+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=string --override --code=c
143+
if %errorlevel% neq 0 exit /b %errorlevel%
144+
131145
set TEST_NAME=testGeneratorSegment10000
132146
set OUTDIR=.\generated_files\%TEST_NAME%
133147
mkdir %OUTDIR% 1>NUL 2>NUL
134148
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
135149
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=segment --override
136150
if %errorlevel% neq 0 exit /b %errorlevel%
137151

152+
set TEST_NAME=testGeneratorSegment10000_C
153+
set OUTDIR=.\generated_files\%TEST_NAME%
154+
mkdir %OUTDIR% 1>NUL 2>NUL
155+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
156+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=segment --override --code=c
157+
if %errorlevel% neq 0 exit /b %errorlevel%
158+
138159
set TEST_NAME=testGeneratorWin32
139160
set OUTDIR=.\generated_files\%TEST_NAME%
140161
mkdir %OUTDIR% 1>NUL 2>NUL
141162
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
142163
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=win32 --override
143164
if %errorlevel% neq 0 exit /b %errorlevel%
144165

166+
set TEST_NAME=testGeneratorWin32_C
167+
set OUTDIR=.\generated_files\%TEST_NAME%
168+
mkdir %OUTDIR% 1>NUL 2>NUL
169+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
170+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=win32 --override --code=c
171+
if %errorlevel% neq 0 exit /b %errorlevel%
172+
145173
set TEST_NAME=testNamespace
146174
set OUTDIR=.\generated_files\%TEST_NAME%
147175
mkdir %OUTDIR% 1>NUL 2>NUL
148176
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
149177
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=segment --override --namespace=foobar
150178
if %errorlevel% neq 0 exit /b %errorlevel%
151179

180+
set TEST_NAME=testNamespace_C
181+
set OUTDIR=.\generated_files\%TEST_NAME%
182+
mkdir %OUTDIR% 1>NUL 2>NUL
183+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
184+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=segment --override --baseclass=Bin2cFile2 --namespace=foobar --code=c
185+
if %errorlevel% neq 0 exit /b %errorlevel%
186+
152187
set TEST_NAME=testBaseClass
153188
set OUTDIR=.\generated_files\%TEST_NAME%
154189
mkdir %OUTDIR% 1>NUL 2>NUL
155190
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
156191
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=segment --override --baseclass=Resource
157192
if %errorlevel% neq 0 exit /b %errorlevel%
158193

194+
set TEST_NAME=testBaseClass_C
195+
set OUTDIR=.\generated_files\%TEST_NAME%
196+
mkdir %OUTDIR% 1>NUL 2>NUL
197+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.bin --size=10000 --fill=sequential
198+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.h --identifier=%TEST_NAME% --chunksize=450 --generator=segment --override --baseclass=Resource --namespace=tbc --code=c
199+
if %errorlevel% neq 0 exit /b %errorlevel%
200+
159201
set TEST_NAME=testEncodingOct
160202
set OUTDIR=.\generated_files\%TEST_NAME%
161203
mkdir %OUTDIR% 1>NUL 2>NUL
@@ -201,6 +243,15 @@ mkdir %OUTDIR% 1>NUL 2>NUL
201243
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.2.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.2.h --identifier=%TEST_NAME%2 --registerfile --override
202244
if %errorlevel% neq 0 exit /b %errorlevel%
203245

246+
set TEST_NAME=testFileManager_C
247+
set OUTDIR=.\generated_files\%TEST_NAME%
248+
mkdir %OUTDIR% 1>NUL 2>NUL
249+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.1.bin --size=1000 --fill=random --seed=1
250+
@TESTFILEGENERATOR_TARGET_FILE@ --file=%OUTDIR%\%TEST_NAME%.2.bin --size=1000 --fill=random --seed=2
251+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.1.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.1.h --identifier=%TEST_NAME%1 --managerfile=filemanager.h --override --code=c
252+
@BIN2CPP_TARGET_FILE@ --noheader --file=%OUTDIR%\%TEST_NAME%.2.bin --output=%OUTDIR% --headerfile=_%TEST_NAME%.2.h --identifier=%TEST_NAME%2 --registerfile --override --code=c
253+
if %errorlevel% neq 0 exit /b %errorlevel%
254+
204255
set TEST_NAME=testDir01
205256
set OUTDIR=.\generated_files\%TEST_NAME%
206257
mkdir %OUTDIR% 1>NUL 2>NUL

0 commit comments

Comments
 (0)