From a4ab30cbe3d86e50a296232242fde461b56d0f3a Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 20 Feb 2018 00:22:14 +0100 Subject: [PATCH] Replace uint8_t with short to fix CI. --- test/testtype.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/testtype.cpp b/test/testtype.cpp index 70ef068b3..15a9044b6 100644 --- a/test/testtype.cpp +++ b/test/testtype.cpp @@ -23,7 +23,6 @@ #include "tokenize.h" #include -#include // for uint8_t class TestType : public TestFixture { public: @@ -70,7 +69,7 @@ private: // and unsigned types having already a size of 4 bytes { const std::string type[6] = {"unsigned char", /*[unsigned]*/"char", "bool", "unsigned short", "unsigned int", "unsigned long"}; - for (uint8_t i = 0; i < 6U; ++i) { + for (short i = 0; i < 6U; ++i) { check((type[i] + " f(" + type[i] +" x) { return x << 33; }").c_str(),&settings); ASSERT_EQUALS("[test.cpp:1]: (error) Shifting 32-bit value by 33 bits is undefined behaviour\n", errout.str()); check((type[i] + " f(int x) { return (x = (" + type[i] + ")x << 32); }").c_str(),&settings); @@ -83,7 +82,7 @@ private: // and signed types having already a size of 4 bytes { const std::string type[7] = {"signed char", "signed short", /*[signed]*/"short", /*[signed]*/"int", "signed int", /*[signed]*/"long", "signed long"}; - for (uint8_t i = 0; i < 7U; ++i) { + for (short i = 0; i < 7U; ++i) { check((type[i] + " f(" + type[i] +" x) { return x << 33; }").c_str(),&settings); ASSERT_EQUALS("[test.cpp:1]: (error) Shifting 32-bit value by 33 bits is undefined behaviour\n", errout.str()); check((type[i] + " f(int x) { return (x = (" + type[i] + ")x << 32); }").c_str(),&settings);