Пример #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
Пример #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");
}
Пример #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");
}
Пример #4
0
void setup(void)
{
    five_dollars = money_create(5, "USD");
}