more tests
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@4973 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
This commit is contained in:
parent
2084118c8d
commit
e8a448bf94
|
@ -1,14 +1,17 @@
|
|||
enum class Color : char { red, blue };
|
||||
enum class Color1 : char { red, blue };
|
||||
|
||||
enum Color2 : char { red, blue };
|
||||
|
||||
// defaults to int
|
||||
enum class TrafficLight { red, yellow, green };
|
||||
|
||||
static_assert(sizeof(Color)==sizeof(char), "size of Color");
|
||||
static_assert(sizeof(Color::red)==sizeof(char), "size of Color::red");
|
||||
static_assert(sizeof(Color1)==sizeof(char), "size of Color1");
|
||||
static_assert(sizeof(Color2)==sizeof(char), "size of Color2");
|
||||
static_assert(sizeof(Color1::red)==sizeof(char), "size of Color1::red");
|
||||
static_assert(sizeof(TrafficLight::red)==sizeof(int), "size of TrafficLight::red");
|
||||
|
||||
int main()
|
||||
{
|
||||
Color c;
|
||||
c=Color::red;
|
||||
Color1 c;
|
||||
c=Color1::red;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue