MCPcopy Create free account
hub / github.com/WheretIB/nullc / Run

Method Run

tests/TestLongNames.cpp:7–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5struct TestLongVariable : TestQueue
6{
7 virtual void Run()
8 {
9 char code[8192];
10 char name[NULLC_MAX_VARIABLE_NAME_LENGTH];
11 for(unsigned int i = 0; i < NULLC_MAX_VARIABLE_NAME_LENGTH; i++)
12 name[i] = 'a';
13 name[NULLC_MAX_VARIABLE_NAME_LENGTH - 1] = 0;
14 SafeSprintf(code, 8192, "int %s = 12; return %s;", name, name);
15 for(int t = 0; t < 2; t++)
16 {
17 testsCount[t]++;
18 if(Tests::RunCode(code, t, "12", "Long variable name."))
19 testsPassed[t]++;
20 }
21 }
22};
23TestLongVariable testLongVariable;
24

Callers

nothing calls this directly

Calls 1

SafeSprintfFunction · 0.50

Tested by

no test coverage detected