Skip to content

Commit

Permalink
[CI] Added c/types test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmed256 committed Jul 31, 2018
1 parent 8ca55f2 commit b07f57d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ namespace occa {
occa::properties allProps = props + kernelProperties();
allProps["mode"] = mode();

// TODO: [#184] Properly hash through device
hash_t kernelHash = (hash()
^ occa::hash(allProps)
^ hashFile(filename));
Expand Down
4 changes: 3 additions & 1 deletion tests/src/c/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ void testNewOccaTypes() {

occaType value = occaUndefined;
ASSERT_TRUE(occaIsUndefined(value));
ASSERT_FALSE(occaIsDefault(value));

value = occaInt(1);
value = occaDefault;
ASSERT_FALSE(occaIsUndefined(value));
ASSERT_TRUE(occaIsDefault(value));

TEST_OCCA_TYPE((void*) NULL, OCCA_PTR);

Expand Down

0 comments on commit b07f57d

Please sign in to comment.