| 34 | } |
| 35 | |
| 36 | void set() const { |
| 37 | Standards stds; |
| 38 | ASSERT_EQUALS_ENUM(Standards::CLatest, stds.c); |
| 39 | ASSERT_EQUALS("", stds.stdValueC); |
| 40 | ASSERT_EQUALS_ENUM(Standards::CPPLatest, stds.cpp); |
| 41 | ASSERT_EQUALS("", stds.stdValueCPP); |
| 42 | |
| 43 | ASSERT_EQUALS(true, stds.setC("c99")); |
| 44 | ASSERT_EQUALS_ENUM(Standards::C99, stds.c); |
| 45 | ASSERT_EQUALS("c99", stds.stdValueC); |
| 46 | ASSERT_EQUALS_ENUM(Standards::CPPLatest, stds.cpp); |
| 47 | ASSERT_EQUALS("", stds.stdValueCPP); |
| 48 | |
| 49 | ASSERT_EQUALS(true, stds.setC("c11")); |
| 50 | ASSERT_EQUALS_ENUM(Standards::C11, stds.c); |
| 51 | ASSERT_EQUALS("c11", stds.stdValueC); |
| 52 | ASSERT_EQUALS_ENUM(Standards::CPPLatest, stds.cpp); |
| 53 | ASSERT_EQUALS("", stds.stdValueCPP); |
| 54 | |
| 55 | ASSERT_EQUALS(true, stds.setCPP("c++11")); |
| 56 | ASSERT_EQUALS_ENUM(Standards::C11, stds.c); |
| 57 | ASSERT_EQUALS("c11", stds.stdValueC); |
| 58 | ASSERT_EQUALS_ENUM(Standards::CPP11, stds.cpp); |
| 59 | ASSERT_EQUALS("c++11", stds.stdValueCPP); |
| 60 | |
| 61 | ASSERT_EQUALS(true, stds.setCPP("c++23")); |
| 62 | ASSERT_EQUALS_ENUM(Standards::C11, stds.c); |
| 63 | ASSERT_EQUALS("c11", stds.stdValueC); |
| 64 | ASSERT_EQUALS_ENUM(Standards::CPP23, stds.cpp); |
| 65 | ASSERT_EQUALS("c++23", stds.stdValueCPP); |
| 66 | |
| 67 | ASSERT_EQUALS(false, stds.setC("c77")); |
| 68 | ASSERT_EQUALS_ENUM(Standards::C11, stds.c); |
| 69 | ASSERT_EQUALS("c11", stds.stdValueC); |
| 70 | ASSERT_EQUALS_ENUM(Standards::CPP23, stds.cpp); |
| 71 | ASSERT_EQUALS("c++23", stds.stdValueCPP); |
| 72 | |
| 73 | ASSERT_EQUALS(false, stds.setCPP("c+77")); |
| 74 | ASSERT_EQUALS_ENUM(Standards::C11, stds.c); |
| 75 | ASSERT_EQUALS("c11", stds.stdValueC); |
| 76 | ASSERT_EQUALS_ENUM(Standards::CPP23, stds.cpp); |
| 77 | ASSERT_EQUALS("c++23", stds.stdValueCPP); |
| 78 | |
| 79 | ASSERT_EQUALS(false, stds.setC("C23")); |
| 80 | ASSERT_EQUALS_ENUM(Standards::C11, stds.c); |
| 81 | ASSERT_EQUALS("c11", stds.stdValueC); |
| 82 | ASSERT_EQUALS_ENUM(Standards::CPP23, stds.cpp); |
| 83 | ASSERT_EQUALS("c++23", stds.stdValueCPP); |
| 84 | |
| 85 | ASSERT_EQUALS(false, stds.setCPP("C++11")); |
| 86 | ASSERT_EQUALS_ENUM(Standards::C11, stds.c); |
| 87 | ASSERT_EQUALS("c11", stds.stdValueC); |
| 88 | ASSERT_EQUALS_ENUM(Standards::CPP23, stds.cpp); |
| 89 | ASSERT_EQUALS("c++23", stds.stdValueCPP); |
| 90 | } |
| 91 | |
| 92 | void setCPPAlias() const { |
| 93 | Standards stds; |
no test coverage detected