NativeTests.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #include "stdafx.h"
  6. #define CATCH_CONFIG_RUNNER
  7. #pragma warning(push)
  8. // conversion from 'int' to 'char', possible loss of data
  9. #pragma warning(disable:4242)
  10. #pragma warning(disable:4244)
  11. #pragma warning(disable:26434) // Function definition hides non-virtual function in base class
  12. #pragma warning(disable:26439) // Implicit noexcept
  13. #pragma warning(disable:26451) // Arithmetic overflow
  14. #pragma warning(disable:26495) // Uninitialized member variable
  15. #include "catch.hpp"
  16. #pragma warning(pop)
  17. TestHooks g_testHooks = { 0 };
  18. bool g_testHooksLoaded = false;
  19. extern "C"
  20. HRESULT __stdcall OnChakraCoreLoadedEntry(TestHooks& testHooks)
  21. {
  22. g_testHooks = testHooks;
  23. g_testHooksLoaded = true;
  24. return S_OK;
  25. }
  26. // Use nativetests.exe -? to get all command line options
  27. int _cdecl main(int argc, char * const argv[])
  28. {
  29. return Catch::Session().run(argc, argv);
  30. }