Test Your ENI Operations

Test From EniBase Interface

Your ENI operations will only be accessed from the two public member functions of eni::EniBase.

  • Gas getGas() should return the gas cost of your ENI operation.
  • char* start() should run your ENI operation and return the results in JSON format.

You may test your subclass through these two public functions.

eni::EniBase* functor = new Reverse("[\"Hello World\"]");
ASSERT_NE(functor, nullptr);
EXPECT_EQ(functor->getGas(), 12);
char* ret = functor->start();
EXPECT_EQ(::strcmp(ret, "[\"!dlroW olleH\"]"), 0);
delete functor;

Test From Shared Library Interface

Setup Environment

Make sure libENI can be found in your environment. See Getting Started for how to install libENI.

You might want to try the following settings if libENI is installed but not found in your environment.


Tools for Testing