test.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright (C) 2009 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango.org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. #include "stdafx.h"
  23. #include <string.h>
  24. #include <stdlib.h>
  25. #include <assert.h>
  26. //#include "tsk.h"
  27. //#include "tnet.h"
  28. #include "tinyhttp.h"
  29. //#include "thttp.h"
  30. //#include "tinyHTTP/thttp_message.h"
  31. //#include "tinyHTTP/auth/thttp_auth.h"
  32. #define LOOP 0
  33. #define RUN_TEST_ALL 0
  34. #define RUN_TEST_AUTH 0
  35. #define RUN_TEST_STACK 1
  36. #define RUN_TEST_URL 0
  37. #define RUN_TEST_MSGS 0
  38. #define RUN_TEST_TRANSPORT 0
  39. #include "test_auth.h"
  40. #include "test_stack.h"
  41. #include "test_url.h"
  42. #include "test_messages.h"
  43. #include "test_transport.h"
  44. #ifdef _WIN32_WCE
  45. int _tmain(int argc, _TCHAR* argv[])
  46. #else
  47. int main()
  48. #endif
  49. {
  50. tnet_startup();
  51. do {
  52. /* Print copyright information */
  53. printf("Doubango Project\nCopyright (C) 2009-2013 Mamadou Diop \n\n");
  54. #if RUN_TEST_AUTH || RUN_TEST_ALL
  55. test_ws_auth();
  56. test_basic_auth();
  57. test_digest_auth();
  58. #endif
  59. #if RUN_TEST_STACK || RUN_TEST_ALL
  60. test_stack();
  61. #endif
  62. #if RUN_TEST_URL || RUN_TEST_ALL
  63. test_url();
  64. #endif
  65. #if RUN_TEST_MSGS || RUN_TEST_ALL
  66. test_messages();
  67. #endif
  68. #if RUN_TEST_TRANSPORT || RUN_TEST_ALL
  69. test_transport();
  70. #endif
  71. }
  72. while(LOOP);
  73. tnet_cleanup();
  74. return 0;
  75. }