This library contains code that extends and simplifies different operations
for C language based programs.
Revision | 414ed256d7bbaeaedbf90d053b851c0ca3b55bc9 (tree) |
---|---|
Zeit | 2018-10-10 12:35:50 |
Autor | Sergey Gusarov |
Commiter | Sergey Gusarov |
64 bit unity test failed on ms vc++. Attempt to enable them only when it's appropriate
@@ -65,8 +65,10 @@ | ||
65 | 65 | TEST_ASSERT_EQUAL_INT32(roundf32(1.5f), 2); |
66 | 66 | TEST_ASSERT_EQUAL_UINT32(uroundf32(1.5f), 2U); |
67 | 67 | |
68 | +#if defined(UNITY_INCLUDE_64) || defined(UNITY_LONG_WIDTH == 64) | |
68 | 69 | TEST_ASSERT_EQUAL_INT64(roundf64(1.5f), 2); |
69 | 70 | TEST_ASSERT_EQUAL_UINT64(uroundf64(1.5f), 2U); |
71 | +#endif | |
70 | 72 | |
71 | 73 | |
72 | 74 | TEST_ASSERT_EQUAL_INT8(round8(1.5), 2); |
@@ -78,6 +80,8 @@ | ||
78 | 80 | TEST_ASSERT_EQUAL_INT32(round32(1.5), 2); |
79 | 81 | TEST_ASSERT_EQUAL_UINT32(uround32(1.5), 2U); |
80 | 82 | |
83 | +#if defined(UNITY_INCLUDE_64) || defined(UNITY_LONG_WIDTH == 64) | |
81 | 84 | TEST_ASSERT_EQUAL_INT64(round64(1.5), 2); |
82 | 85 | TEST_ASSERT_EQUAL_UINT64(uround64(1.5), 2U); |
86 | +#endif | |
83 | 87 | } |
@@ -41,8 +41,10 @@ | ||
41 | 41 | TEST_ASSERT_EQUAL_INT32(CT_SIMPLE_ROUNDF32(1.5f), 2); |
42 | 42 | TEST_ASSERT_EQUAL_UINT32(CT_SIMPLE_UROUNDF32(1.5f), 2U); |
43 | 43 | |
44 | +#if defined(UNITY_INCLUDE_64) || defined(UNITY_LONG_WIDTH == 64) | |
44 | 45 | TEST_ASSERT_EQUAL_INT64(CT_SIMPLE_ROUNDF64(1.5f), 2); |
45 | 46 | TEST_ASSERT_EQUAL_UINT64(CT_SIMPLE_UROUNDF64(1.5f), 2U); |
47 | +#endif | |
46 | 48 | |
47 | 49 | |
48 | 50 | TEST_ASSERT_EQUAL_INT8(CT_SIMPLE_ROUND8(1.5), 2); |
@@ -54,8 +56,10 @@ | ||
54 | 56 | TEST_ASSERT_EQUAL_INT32(CT_SIMPLE_ROUND32(1.5), 2); |
55 | 57 | TEST_ASSERT_EQUAL_UINT32(CT_SIMPLE_UROUND32(1.5), 2U); |
56 | 58 | |
59 | +#if defined(UNITY_INCLUDE_64) || defined(UNITY_LONG_WIDTH == 64) | |
57 | 60 | TEST_ASSERT_EQUAL_INT64(CT_SIMPLE_ROUND64(1.5), 2); |
58 | 61 | TEST_ASSERT_EQUAL_UINT64(CT_SIMPLE_UROUND64(1.5), 2U); |
62 | +#endif | |
59 | 63 | } |
60 | 64 | |
61 | 65 | void testAdditional(void) |