Lines Matching defs:tc
26 #include "atf-c/tc.h"
39 ATF_TC_HEAD(empty, tc)
41 if (tc != NULL) {}
43 ATF_TC_BODY(empty, tc)
47 ATF_TC_HEAD(test_var, tc)
49 atf_tc_set_md_var(tc, "test-var", "Test text");
57 ATF_TC_HEAD(init, tc)
59 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_init function");
63 atf_tc_t tc;
65 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
67 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test1") == 0);
68 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
69 atf_tc_fini(&tc);
71 RE(atf_tc_init(&tc, "test2", ATF_TC_HEAD_NAME(test_var),
73 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test2") == 0);
74 ATF_REQUIRE(atf_tc_has_md_var(&tc, "test-var"));
75 atf_tc_fini(&tc);
79 ATF_TC_HEAD(init_pack, tc)
81 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_init_pack function");
85 atf_tc_t tc;
99 RE(atf_tc_init_pack(&tc, &tcp1, NULL));
100 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test1") == 0);
101 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
102 atf_tc_fini(&tc);
104 RE(atf_tc_init_pack(&tc, &tcp2, NULL));
105 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test2") == 0);
106 ATF_REQUIRE(atf_tc_has_md_var(&tc, "test-var"));
107 atf_tc_fini(&tc);
111 ATF_TC_HEAD(vars, tc)
113 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_get_md_var, "
118 atf_tc_t tc;
120 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
122 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
123 RE(atf_tc_set_md_var(&tc, "test-var", "Test value"));
124 ATF_REQUIRE(atf_tc_has_md_var(&tc, "test-var"));
125 ATF_REQUIRE(strcmp(atf_tc_get_md_var(&tc, "test-var"), "Test value") == 0);
126 atf_tc_fini(&tc);
130 ATF_TC_HEAD(config, tc)
132 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_get_config_var, "
138 atf_tc_t tc;
141 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
143 ATF_REQUIRE(!atf_tc_has_config_var(&tc, "test-var"));
144 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
145 atf_tc_fini(&tc);
147 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
149 ATF_REQUIRE(atf_tc_has_config_var(&tc, "test-var"));
150 ATF_REQUIRE(strcmp(atf_tc_get_config_var(&tc, "test-var"),
152 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
153 ATF_REQUIRE(!atf_tc_has_config_var(&tc, "test-var2"));
154 ATF_REQUIRE(strcmp(atf_tc_get_config_var_wd(&tc, "test-var2", "def-value"),
156 atf_tc_fini(&tc);