bartest.cxx 506 B

12345678910111213141516171819202122232425262728293031323334353637
  1. extern "C" int bar();
  2. int foo();
  3. int car();
  4. #include <stdio.h>
  5. int main()
  6. {
  7. if(foo() == 10)
  8. {
  9. printf("foo is 10!\n");
  10. }
  11. else
  12. {
  13. printf("foo is not 10 error!\n");
  14. return -1;
  15. }
  16. if(bar() == 20)
  17. {
  18. printf("bar is 20!\n");
  19. }
  20. else
  21. {
  22. printf("bar is not 20 error!\n");
  23. return -1;
  24. }
  25. if(car() == 30)
  26. {
  27. printf("car is 30!\n");
  28. }
  29. else
  30. {
  31. printf("car is not 30 error!\n");
  32. return -1;
  33. }
  34. printf("Test past\n");
  35. return 0;
  36. }