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

Function main

test/core/test_bswap64.cpp:30–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30int main() {
31 quint64 v = strtoull("4433ffeeddccbb00", NULL, 16);
32 printf("%lld\n", v);
33
34 const string string64bitInt = "4433ffeeddccbb00";
35 stringstream s(string64bitInt);
36 quint64 int64bitInt = 0;
37 printf("1\n");
38 s >> hex >> int64bitInt;
39 printf("2\n");
40
41 stringstream out;
42 out << hex << qbswap(int64bitInt);
43
44 cout << out.str() << endl;
45 cout << hex << int64bitInt << endl;
46 cout << string64bitInt << endl;
47
48 if (out.str() != "bbccddeeff3344") {
49 cout << "Failed!" << endl;
50 } else {
51 cout << "Succeeded!" << endl;
52 }
53
54 return 0;
55}

Callers

nothing calls this directly

Calls 4

strtoullFunction · 0.85
printfFunction · 0.85
qbswapFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected