Skip to content

Commit

Permalink
Use proper format specifiers for uint64_t and uint32_t
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Nov 11, 2024
1 parent b2f44b8 commit 18d6412
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion mulxp1_32_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "mulxp_hash.hpp"
#include <vector>
#include <cstdio>
#include <cinttypes>

// Test vectors for mulxp1_hash32

Expand Down Expand Up @@ -67,7 +68,7 @@ int main()

if( r != e.result )
{
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %08X: was %08X, expected %08X\n", e.length, e.seed, r, e.result );
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %08" PRIX32 ": was %08" PRIX32 ", expected %08" PRIX32 "\n", e.length, e.seed, r, e.result );
++errors;
}
}
Expand Down
3 changes: 2 additions & 1 deletion mulxp1_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "mulxp_hash.hpp"
#include <vector>
#include <cstdio>
#include <cinttypes>

// Test vectors for mulxp1_hash

Expand Down Expand Up @@ -84,7 +85,7 @@ int main()

if( r != e.result )
{
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %016llX: was %016llX, expected %016llX\n", e.length, e.seed, r, e.result );
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %016" PRIX64 ": was %016" PRIX64 ", expected %016" PRIX64 "\n", e.length, e.seed, r, e.result );
++errors;
}
}
Expand Down
3 changes: 2 additions & 1 deletion mulxp3_32_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "mulxp_hash.hpp"
#include <vector>
#include <cstdio>
#include <cinttypes>

// Test vectors for mulxp1_hash32

Expand Down Expand Up @@ -67,7 +68,7 @@ int main()

if( r != e.result )
{
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %08X: was %08X, expected %08X\n", e.length, e.seed, r, e.result );
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %08" PRIX32 ": was %08" PRIX32 ", expected %08" PRIX32 "\n", e.length, e.seed, r, e.result );
++errors;
}
}
Expand Down
3 changes: 2 additions & 1 deletion mulxp3_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "mulxp_hash.hpp"
#include <vector>
#include <cstdio>
#include <cinttypes>

// Test vectors for mulxp3_hash

Expand Down Expand Up @@ -84,7 +85,7 @@ int main()

if( r != e.result )
{
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %016llX: was %016llX, expected %016llX\n", e.length, e.seed, r, e.result );
std::fprintf( stderr, "Reference value mismatch for length %zu, seed %016" PRIX64 ": was %016" PRIX64 ", expected %016" PRIX64 "\n", e.length, e.seed, r, e.result );
++errors;
}
}
Expand Down

0 comments on commit 18d6412

Please sign in to comment.