Skip to content

Commit

Permalink
add host operation test
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Dec 16, 2022
1 parent f68c933 commit 995f9e2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/base/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ TEST_F(Executor, RunsCorrectOperation)
}


void host_operation(int& value) { value = 1234; }

GKO_REGISTER_HOST_OPERATION(host_operation, host_operation);


TEST_F(Executor, RunsCorrectHostOperation)
{
int value = 0;

exec->run(make_host_operation(value));

ASSERT_EQ(1234, value);
}


#ifndef GKO_COMPILING_REFERENCE


Expand Down

0 comments on commit 995f9e2

Please sign in to comment.