MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / verify

Function verify

test/browser/gl_matrix_identity.c:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38#include <assert.h>
39
40void verify() {
41 int width = 640, height = 480;
42 unsigned char *data = (unsigned char*)malloc(width*height*4);
43 glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
44 int sum = 0;
45 for (int x = 0; x < width*height*4; x++) {
46 if (x % 4 != 3) sum += x * data[x];
47 }
48#ifdef __EMSCRIPTEN__
49 REPORT_RESULT(sum);
50#endif
51}
52
53int main(int argc, char *argv[]) {
54 SDL_Surface *screen;

Callers 2

mainFunction · 0.70
~CustomSmartPtrMethod · 0.50

Calls 1

mallocFunction · 0.50

Tested by 1

~CustomSmartPtrMethod · 0.40