CoreFW  Check-in [3e28d1e360]

Overview
Comment:Nicer tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3e28d1e36010bc83c331bca4283b9b88b0921d13d30b8b213b3c52f2dc13d8d9
User & Date: js on 2012-04-22 14:19:37
Other Links: manifest | tags
Context
2012-04-22
15:30
Rename cfw_new_p to cfw_create. check-in: 8f2b2b8255 user: js tags: trunk
14:19
Nicer tests. check-in: 3e28d1e360 user: js tags: trunk
14:17
Add int boxing. check-in: 8eceaeb4a4 user: js tags: trunk
Changes

Modified tests/tests.c from [4f675be50b] to [8e2fa3e14c].

39
40
41
42
43
44
45
46
47

48
49
50
51
52
53
54
55
56
57
58
59
60
61
	cfw_map_iter_t iter;

	cfw_map_iter(map, &iter);

	fputs("{\n", stdout);

	while (iter.key != NULL) {
		if (cfw_is(iter.obj, cfw_string)) {
			printf("\t%s = %s\n",

			    cfw_string_c(iter.key),
			    cfw_string_c(iter.obj));
		} else if (cfw_is(iter.obj, cfw_int)) {
			printf("\t%s = %jd\n",
			    cfw_string_c(iter.key),
			    cfw_int_value(iter.obj));
		}

		cfw_map_iter_next(&iter);
	}

	fputs("}\n", stdout);
}








<
|
>
|
|
|
<
<
|
<







39
40
41
42
43
44
45

46
47
48
49
50


51

52
53
54
55
56
57
58
	cfw_map_iter_t iter;

	cfw_map_iter(map, &iter);

	fputs("{\n", stdout);

	while (iter.key != NULL) {

		printf("\t%s = ", cfw_string_c(iter.key));

		if (cfw_is(iter.obj, cfw_string))
			printf("%s\n", cfw_string_c(iter.obj));
		else if (cfw_is(iter.obj, cfw_int))


			printf("%jd\n", cfw_int_value(iter.obj));


		cfw_map_iter_next(&iter);
	}

	fputs("}\n", stdout);
}