|
OpenTTD Source 20251116-master-g21329071df
|
Test whether we do not trigger an over optimisation of enums. More...
#include "../stdafx.h"#include "../core/enum_type.hpp"#include "../3rdparty/catch2/catch.hpp"#include "../safeguards.h"Go to the source code of this file.
Enumerations | |
| enum | TestEnum : int8_t { ZERO , ONE , TWO } |
| enum class | TestEnumFlags : uint8_t { Zero = 0 , One = 1 << 0 , Two = 1 << 1 } |
Functions | |
| TEST_CASE ("EnumOverOptimisation_BoundsCheck") | |
| TEST_CASE ("EnumOverOptimisation_Bitmask") | |
Test whether we do not trigger an over optimisation of enums.
For more details, see http://gcc.gnu.org/PR43680 and PR#5246.
Definition in file enum_over_optimisation.cpp.
| enum TestEnum : int8_t |
Definition at line 22 of file enum_over_optimisation.cpp.
|
strong |
Definition at line 37 of file enum_over_optimisation.cpp.
| TEST_CASE | ( | "EnumOverOptimisation_Bitmask" | ) |
Definition at line 44 of file enum_over_optimisation.cpp.
| TEST_CASE | ( | "EnumOverOptimisation_BoundsCheck" | ) |
Definition at line 28 of file enum_over_optimisation.cpp.