Example #1
0
} END_TEST

START_TEST (test_money_create_neg) {
  Money *m = money_create (-1, "USD");
  fail_unless (m == NULL,
	       "NULL should be returned on attempt to create with "
	       "a negative amount");
} END_TEST
Example #2
0
END_TEST

START_TEST (test_money_create_zero)
{
    Money *m = money_create(0, "USD");
    if (money_amount(m) != 0)
        ck_abort_msg("Zero is a valid amount of money");
}
Example #3
0
END_TEST

START_TEST (test_money_create_zero)
{
  Money *m = money_create (0, "USD");
  fail_unless (money_amount (m) == 0, 
	       "Zero is a valid amount of money");
}
Example #4
0
void setup(void)
{
    five_dollars = money_create(5, "USD");
}