TestFramework.h 1.9 KB

12345678910111213141516171819202122232425262728293031
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <Jolt.h>
  5. #pragma warning (push, 0)
  6. #pragma warning (disable : 5039) // winbase.h(13179): warning C5039: 'TpSetCallbackCleanupGroup': pointer or reference to potentially throwing function passed to 'extern "C"' function under -EHc. Undefined behavior may occur if this function throws an exception.
  7. #pragma warning (disable : 5204) // implements.h(65): warning C5204: 'Microsoft::WRL::CloakedIid<IMarshal>': class has virtual functions, but its trivial destructor is not virtual; instances of objects derived from this class may not be destructed correctly
  8. #pragma warning (disable : 4265) // implements.h(1449): warning C4265: 'Microsoft::WRL::FtmBase': class has virtual functions, but its non-trivial destructor is not virtual; instances of this class may not be destructed correctly
  9. #pragma warning (disable : 5220) // implements.h(1648): warning C5220: 'Microsoft::WRL::Details::RuntimeClassImpl<Microsoft::WRL::RuntimeClassFlags<2>,true,false,true,IWeakReference>::refcount_': a non-static data member with a volatile qualified type no longer implies
  10. #pragma warning (disable : 4986) // implements.h(2343): warning C4986: 'Microsoft::WRL::Details::RuntimeClassImpl<RuntimeClassFlagsT,true,true,false,I0,TInterfaces...>::GetWeakReference': exception specification does not match previous declaration
  11. #define WIN32_LEAN_AND_MEAN
  12. #define Ellipse DrawEllipse // Windows.h defines a name that we would like to use
  13. #include <windows.h>
  14. #undef Ellipse
  15. #undef min // We'd like to use std::min and max instead of the ones defined in windows.h
  16. #undef max
  17. #undef DrawText // We don't want this to map to DrawTextW
  18. #include <d3d12.h>
  19. #include <dxgi1_6.h>
  20. #include <wrl.h> // for ComPtr
  21. #pragma warning (pop)
  22. #if defined(__clang__)
  23. #pragma clang diagnostic ignored "-Wheader-hygiene"
  24. #endif
  25. using Microsoft::WRL::ComPtr;
  26. using namespace JPH;