| OLD | NEW |
| 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 #include "src/shared/assert.h" | 5 #include "src/shared/assert.h" |
| 6 #include "src/shared/globals.h" | 6 #include "src/shared/globals.h" |
| 7 #include "src/shared/test_case.h" | 7 #include "src/shared/test_case.h" |
| 8 | 8 |
| 9 namespace fletch { | 9 namespace dartino { |
| 10 | 10 |
| 11 TEST_CASE(TypeSizes) { | 11 TEST_CASE(TypeSizes) { |
| 12 EXPECT_EQ(1U, sizeof(uint8)); | 12 EXPECT_EQ(1U, sizeof(uint8)); |
| 13 EXPECT_EQ(1U, sizeof(int8)); | 13 EXPECT_EQ(1U, sizeof(int8)); |
| 14 | 14 |
| 15 EXPECT_EQ(2U, sizeof(uint16)); | 15 EXPECT_EQ(2U, sizeof(uint16)); |
| 16 EXPECT_EQ(2U, sizeof(int16)); | 16 EXPECT_EQ(2U, sizeof(int16)); |
| 17 | 17 |
| 18 EXPECT_EQ(4U, sizeof(uint32)); | 18 EXPECT_EQ(4U, sizeof(uint32)); |
| 19 EXPECT_EQ(4U, sizeof(int32)); | 19 EXPECT_EQ(4U, sizeof(int32)); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 35 static char c1[] = {1}; | 35 static char c1[] = {1}; |
| 36 EXPECT_EQ(1U, ARRAY_SIZE(c1)); | 36 EXPECT_EQ(1U, ARRAY_SIZE(c1)); |
| 37 static char c2[] = {1, 2}; | 37 static char c2[] = {1, 2}; |
| 38 EXPECT_EQ(2U, ARRAY_SIZE(c2)); | 38 EXPECT_EQ(2U, ARRAY_SIZE(c2)); |
| 39 static char c3[3] = { | 39 static char c3[3] = { |
| 40 0, | 40 0, |
| 41 }; | 41 }; |
| 42 EXPECT_EQ(3U, ARRAY_SIZE(c3)); | 42 EXPECT_EQ(3U, ARRAY_SIZE(c3)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace fletch | 45 } // namespace dartino |
| OLD | NEW |