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

Function CompileFile

UnitTests.cpp:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58nullres CompileFile(const char* fileName)
59{
60 static char content[64 * 1024];
61
62 FILE *euler = fopen(fileName, "rb");
63 fseek(euler, 0, SEEK_END);
64 unsigned int textSize = ftell(euler);
65 assert(textSize < 64 * 1024);
66 fseek(euler, 0, SEEK_SET);
67 fread(content, 1, textSize, euler);
68 content[textSize] = 0;
69 fclose(euler);
70
71 return nullcCompile(content);
72}
73
74void RunTests(bool verbose)
75{

Callers 1

RunTestsFunction · 0.85

Calls 2

assertFunction · 0.85
nullcCompileFunction · 0.85

Tested by

no test coverage detected