Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
923 B

  1. // test Burnslib ASSERT macro
  2. #include "headers.hxx"
  3. HINSTANCE hResourceModuleHandle = 0;
  4. const wchar_t* RUNTIME_NAME = L"coretest";
  5. DWORD DEFAULT_LOGGING_OPTIONS = Burnslib::Log::OUTPUT_TYPICAL;
  6. void
  7. f3()
  8. {
  9. LOG_FUNCTION(f3);
  10. LOG_LAST_WINERROR();
  11. {
  12. LOG_SCOPE(L"nested scope");
  13. }
  14. class Foo
  15. {
  16. public:
  17. Foo()
  18. {
  19. LOG_CTOR(Foo);
  20. }
  21. ~Foo()
  22. {
  23. LOG_DTOR(Foo);
  24. }
  25. void
  26. Method()
  27. {
  28. LOG_FUNCTION(Foo::Method);
  29. ASSERT(false);
  30. }
  31. };
  32. Foo afoo;
  33. afoo.Method();
  34. }
  35. void
  36. f2()
  37. {
  38. LOG_FUNCTION2(f2, L"this is f2");
  39. f3();
  40. }
  41. void
  42. f1()
  43. {
  44. LOG_FUNCTION(f1);
  45. f2();
  46. }
  47. VOID
  48. _cdecl
  49. main(int, char **)
  50. {
  51. LOG_FUNCTION(main);
  52. LOG(L"Let the games begin");
  53. f1();
  54. LOG(L"now ending main");
  55. }