diff --git a/driver/tests/basic/main.cpp b/driver/tests/basic/main.cpp index 586173eb..7377a860 100755 --- a/driver/tests/basic/main.cpp +++ b/driver/tests/basic/main.cpp @@ -185,8 +185,8 @@ int run_kernel_test(const kernel_arg_t& kernel_arg, int32_t curr = ((int32_t*)vx_host_ptr(staging_buf))[i]; int32_t ref = i; if (curr != ref) { - std::cout << "error at result #" << i - << ": actual 0x" << curr << ", expected 0x" << ref << std::endl; + std::cout << "error at result #" << std::dec << i + << std::hex << ": actual 0x" << curr << ", expected 0x" << ref << std::endl; ++errors; } } diff --git a/driver/tests/demo/main.cpp b/driver/tests/demo/main.cpp index 7261869c..68dc33e7 100644 --- a/driver/tests/demo/main.cpp +++ b/driver/tests/demo/main.cpp @@ -82,8 +82,8 @@ int run_test(const kernel_arg_t& kernel_arg, int ref = i + i; int cur = buf_ptr[i]; if (cur != ref) { - std::cout << "error at result #" << i - << ": actual 0x" << cur << ", expected 0x" << ref << std::endl; + std::cout << "error at result #" << std::dec << i + << std::hex << ": actual 0x" << cur << ", expected 0x" << ref << std::endl; ++errors; } } diff --git a/driver/tests/stress/main.cpp b/driver/tests/stress/main.cpp index 1329d5ba..1136c11e 100644 --- a/driver/tests/stress/main.cpp +++ b/driver/tests/stress/main.cpp @@ -114,7 +114,7 @@ void gen_input_data(uint32_t num_points) { test_data.resize(num_points); addr_table.resize(num_points + NUM_LOADS - 1); - for (uint32_t i = 0; i < test_data.size(); ++i) { + for (uint32_t i = 0; i < num_points; ++i) { float r = static_cast(std::rand()) / RAND_MAX; test_data[i] = r; }