Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "myimplementationfile.c"
- #include <gtest/gtest.h>
- // Mock out external dependency on mylogger.o
- void Logger_log(...){}
- TEST(FactorialTest, Zero) {
- EXPECT_EQ(1, Factorial(0));
- }
- #include <tap.h>
- int main () {
- plan(5);
- ok(3 == 3);
- is("fnord", "eek", "two different strings not that way?");
- ok(3 <= 8732, "%d <= %d", 3, 8732);
- like("fnord", "f(yes|no)r*[a-f]$");
- cmp_ok(3, ">=", 10);
- done_testing();
- }
- #include <stdarg.h>
- #include <stddef.h>
- #include <setjmp.h>
- #include <cmocka.h>
- /* A test case that does nothing and succeeds. */
- static void null_test_success(void **state) {
- (void) state; /* unused */
- }
- int main(void) {
- const UnitTest tests[] = {
- unit_test(null_test_success),
- };
- return run_tests(tests);
- }
- check_PROGRAMS = test_oe_amqp
- test_oe_amqp_SOURCES = test_oe_amqp.c
- test_oe_amqp_LDADD = -L$(top_builddir)/components/common -loecommon
- test_oe_amqp_CFLAGS = -I$(top_srcdir)/components/common -static
- TESTS = test_oe_amqp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement