Skip to content

Commit

Permalink
fix a unittest reported error on nvidia
Browse files Browse the repository at this point in the history
  • Loading branch information
hughperkins committed May 28, 2015
1 parent 81bfa24 commit decef8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion EasyCL
3 changes: 3 additions & 0 deletions test/gtest_supp.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ inline ::testing::AssertionResult AssertFloatsNear( const char *expr_one, const
if( absdiff <= absone * 0.0001f ) {
return ::testing::AssertionSuccess();
}
if( absdiff < 0.000000000000001f ) {
return ::testing::AssertionSuccess();
}
std::string onestr = toString(one);
std::string twostr = toString(two);
return ::testing::AssertionFailure()
Expand Down
2 changes: 1 addition & 1 deletion test/testCopyLocal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TEST( testCopyLocal, basic ) {
cout << endl;
for( int i = 12; i < 16; i++ ) {
cout << b[i] << " ";
EXPECT_EQ( 0, b[i] );
EXPECT_FLOAT_NEAR( 0, b[i] );
}
cout << endl;

Expand Down

0 comments on commit decef8e

Please sign in to comment.