File tree 1 file changed +6
-7
lines changed
test/modm/math/saturation
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ SaturationTest::testSigned8bit()
68
68
TEST_ASSERT_EQUALS (x.getValue (), -10 );
69
69
70
70
y = -100 ;
71
- /* x = std:: abs(y);
72
- TEST_ASSERT_EQUALS(x.getValue(), 100); */
71
+ x = abs (y);
72
+ TEST_ASSERT_EQUALS (x.getValue (), 100 );
73
73
74
74
x = y;
75
75
x.absolute ();
@@ -133,7 +133,7 @@ SaturationTest::testUnsigned8bit()
133
133
TEST_ASSERT_EQUALS (x.getValue (), 0U );
134
134
135
135
y = 200 ;
136
- x = std:: abs (y);
136
+ x = abs (y);
137
137
TEST_ASSERT_EQUALS (x.getValue (), 200U );
138
138
139
139
x = y;
@@ -193,7 +193,7 @@ SaturationTest::testSigned16bit()
193
193
TEST_ASSERT_EQUALS (x.getValue (), 10000 );
194
194
195
195
y = -20000 ;
196
- x = std:: abs (y);
196
+ x = abs (y);
197
197
TEST_ASSERT_EQUALS (x.getValue (), 20000 );
198
198
199
199
x = y;
@@ -257,9 +257,8 @@ SaturationTest::testUnsigned16bit()
257
257
TEST_ASSERT_EQUALS (x.getValue (), 0U );
258
258
259
259
y = 20000 ;
260
- // FIXME Fails on AVR ATmega: ambigious overload
261
- /* x = std::abs(y);
262
- TEST_ASSERT_EQUALS(x.getValue(), 20000); */
260
+ x = abs (y);
261
+ TEST_ASSERT_EQUALS (x.getValue (), 20000 );
263
262
264
263
x = y;
265
264
x.absolute ();
You can’t perform that action at this time.
0 commit comments