//main function int main(int argc, char* argv[]) { puts("Under construction!"); puts("Please pardon our mess!"); puts("Currently testing Integer objects."); Integer* intOne = createInteger("intOne", 3, false); Integer* constInt = createInteger("constInt", 4, true); printf("Before changing, the value of %s is %d.\n", intOne->getName(intOne), intOne->getValue(intOne)); printf("Before changing, the value of %s is %d.\n", constInt->getName(constInt), constInt->getValue(constInt)); intOne->setValue(intOne, 5); constInt->setValue(constInt, 6); printf("After changing, the value of %s is %d.\n", intOne->getName(intOne), intOne->getValue(intOne)); printf("After changing, the value of %s is %d.\n", constInt->getName(constInt), constInt->getValue(constInt)); destroyInteger(intOne); destroyInteger(constInt); return EXIT_NO_ERR; }
TEST( Int03, Integers ) { Integer i; i.setValue( 51 ); IntType expected = 51; IntType actual = i.getValue(); CHECK_EQUAL( expected, actual ) }