Lines Matching full:test

26       COMMENT("Test encode and decode with three entries");  in main()
29 TEST(pb_encode(&ostream, Message1_fields, &msg_a)); in main()
33 TEST(pb_decode(&istream, Message1_fields, &msg_b)); in main()
35 TEST(istream.bytes_left == 0); in main()
36 TEST(memcmp(&msg_b, &msg_a, sizeof(msg_a)) == 0); in main()
44 COMMENT("Test wrong number of entries"); in main()
47 TEST(pb_decode(&stream, Message1_fields, &msg)); in main()
48 TEST(msg.data[0] == 0 && msg.data[1] == 1 && msg.data[2] == 2); in main()
51 TEST(!pb_decode(&stream, Message1_fields, &msg)); in main()
52 TEST(strcmp(stream.errmsg, "array overflow") == 0); in main()
55 TEST(!pb_decode(&stream, Message1_fields, &msg)); in main()
56 TEST(strcmp(stream.errmsg, "wrong size for fixed count field") == 0); in main()
68 COMMENT("Test encode and decode with nested messages"); in main()
78 TEST(pb_encode(&ostream, Message2_fields, &msg_a)); in main()
82 TEST(pb_decode(&istream, Message2_fields, &msg_b)); in main()
84 TEST(istream.bytes_left == 0); in main()
85 TEST(memcmp(&msg_b, &msg_a, sizeof(msg_a)) == 0); in main()
97 COMMENT("Test encode and decode with two nested messages"); in main()
128 TEST(pb_encode(&ostream, Message3_fields, &msg_a)); in main()
132 TEST(pb_decode(&istream, Message3_fields, &msg_b)); in main()
134 TEST(istream.bytes_left == 0); in main()
135 TEST(memcmp(&msg_b, &msg_a, sizeof(msg_a)) == 0); in main()
147 COMMENT("Test encode and decode with pointer type fixarray"); in main()
163 TEST(pb_encode(&ostream, Message4_fields, &msg_a)); in main()
166 TEST(get_alloc_count() == 0); in main()
169 TEST(pb_decode(&istream, Message4_fields, &msg_b)); in main()
171 TEST(istream.bytes_left == 0); in main()
173 TEST((*msg_b.submsgs)[0].a == 1); in main()
174 TEST((*msg_b.submsgs)[1].a == 5); in main()
175 TEST((*msg_b.submsgs)[2].a == 999); in main()
177 TEST(strcmp((*msg_b.strings)[0], "a") == 0); in main()
178 TEST(strcmp((*msg_b.strings)[1], "b") == 0); in main()
179 TEST(strcmp((*msg_b.strings)[2], "abc") == 0); in main()
183 TEST(get_alloc_count() == 0); in main()