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

Function SpeedTestFile

tests/TestSpeed.cpp:92–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void SpeedTestFile(const char* file)
93{
94 char *blob = new char[1024 * 1024];
95 FILE *euler = fopen(file, "rb");
96 if(euler)
97 {
98 fseek(euler, 0, SEEK_END);
99 unsigned int textSize = ftell(euler);
100 assert(textSize < 1024 * 1024);
101 fseek(euler, 0, SEEK_SET);
102 fread(blob, 1, textSize, euler);
103 blob[textSize] = 0;
104 fclose(euler);
105
106 SpeedTestText(file, blob);
107 }
108
109 delete[] blob;
110}
111
112void RunSpeedTests()
113{

Callers 1

TestSpeed.cppFile · 0.85

Calls 2

assertFunction · 0.85
SpeedTestTextFunction · 0.85

Tested by

no test coverage detected