1
0
mirror of https://github.com/ioacademy-jikim/debugging synced 2025-06-09 08:56:15 +00:00
debugging/03_day/check-0.10.0/doc/check_money.1-2.c.diff
2015-12-13 22:34:58 +09:00

22 lines
438 B
Diff

--- tests/check_money.1.c 2015-08-03 04:31:25.000000000 +0900
+++ tests/check_money.2.c 2015-08-03 04:31:25.000000000 +0900
@@ -1,4 +1,18 @@
+#include <check.h>
+#include "../src/money.h"
+
+START_TEST(test_money_create)
+{
+ Money *m;
+
+ m = money_create(5, "USD");
+ ck_assert_int_eq(money_amount(m), 5);
+ ck_assert_str_eq(money_currency(m), "USD");
+ money_free(m);
+}
+END_TEST
+
int main(void)
{
return 0;
}