Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include "myimplementationfile.c"
  2. #include <gtest/gtest.h>
  3.  
  4. // Mock out external dependency on mylogger.o
  5. void Logger_log(...){}
  6.  
  7. TEST(FactorialTest, Zero) {
  8. EXPECT_EQ(1, Factorial(0));
  9. }
  10.  
  11. #include <tap.h>
  12.  
  13. int main () {
  14. plan(5);
  15.  
  16. ok(3 == 3);
  17. is("fnord", "eek", "two different strings not that way?");
  18. ok(3 <= 8732, "%d <= %d", 3, 8732);
  19. like("fnord", "f(yes|no)r*[a-f]$");
  20. cmp_ok(3, ">=", 10);
  21.  
  22. done_testing();
  23. }
  24.  
  25. #include <stdarg.h>
  26. #include <stddef.h>
  27. #include <setjmp.h>
  28. #include <cmocka.h>
  29.  
  30. /* A test case that does nothing and succeeds. */
  31. static void null_test_success(void **state) {
  32. (void) state; /* unused */
  33. }
  34.  
  35. int main(void) {
  36. const UnitTest tests[] = {
  37. unit_test(null_test_success),
  38. };
  39. return run_tests(tests);
  40. }
  41.  
  42. check_PROGRAMS = test_oe_amqp
  43.  
  44. test_oe_amqp_SOURCES = test_oe_amqp.c
  45. test_oe_amqp_LDADD = -L$(top_builddir)/components/common -loecommon
  46. test_oe_amqp_CFLAGS = -I$(top_srcdir)/components/common -static
  47.  
  48. TESTS = test_oe_amqp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement