Lines Matching defs:tc
41 ATF_TC_HEAD(empty, tc)
43 if (tc != NULL) {}
45 ATF_TC_BODY(empty, tc)
49 ATF_TC_HEAD(test_var, tc)
51 atf_tc_set_md_var(tc, "test-var", "Test text");
59 ATF_TC_HEAD(init, tc)
61 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_init function");
65 atf_tc_t tc;
67 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
69 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test1") == 0);
70 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
71 atf_tc_fini(&tc);
73 RE(atf_tc_init(&tc, "test2", ATF_TC_HEAD_NAME(test_var),
75 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test2") == 0);
76 ATF_REQUIRE(atf_tc_has_md_var(&tc, "test-var"));
77 atf_tc_fini(&tc);
81 ATF_TC_HEAD(init_pack, tc)
83 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_init_pack function");
87 atf_tc_t tc;
101 RE(atf_tc_init_pack(&tc, &tcp1, NULL));
102 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test1") == 0);
103 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
104 atf_tc_fini(&tc);
106 RE(atf_tc_init_pack(&tc, &tcp2, NULL));
107 ATF_REQUIRE(strcmp(atf_tc_get_ident(&tc), "test2") == 0);
108 ATF_REQUIRE(atf_tc_has_md_var(&tc, "test-var"));
109 atf_tc_fini(&tc);
113 ATF_TC_HEAD(vars, tc)
115 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_get_md_var, "
120 atf_tc_t tc;
122 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
124 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
125 RE(atf_tc_set_md_var(&tc, "test-var", "Test value"));
126 ATF_REQUIRE(atf_tc_has_md_var(&tc, "test-var"));
127 ATF_REQUIRE(strcmp(atf_tc_get_md_var(&tc, "test-var"), "Test value") == 0);
128 atf_tc_fini(&tc);
132 ATF_TC_HEAD(config, tc)
134 atf_tc_set_md_var(tc, "descr", "Tests the atf_tc_get_config_var, "
140 atf_tc_t tc;
143 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
145 ATF_REQUIRE(!atf_tc_has_config_var(&tc, "test-var"));
146 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
147 atf_tc_fini(&tc);
149 RE(atf_tc_init(&tc, "test1", ATF_TC_HEAD_NAME(empty),
151 ATF_REQUIRE(atf_tc_has_config_var(&tc, "test-var"));
152 ATF_REQUIRE(strcmp(atf_tc_get_config_var(&tc, "test-var"),
154 ATF_REQUIRE(!atf_tc_has_md_var(&tc, "test-var"));
155 ATF_REQUIRE(!atf_tc_has_config_var(&tc, "test-var2"));
156 ATF_REQUIRE(strcmp(atf_tc_get_config_var_wd(&tc, "test-var2", "def-value"),
158 atf_tc_fini(&tc);
173 HEADER_TC(include, "atf-c/tc.h");