-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into develop/fix-compiler-warnings
- Loading branch information
Showing
1,524 changed files
with
250,465 additions
and
235,219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# prevent git from changing line endings for conan recipes and CMake files, | ||
# since they are hashed to produce a conan recipe revision ID | ||
conanfile.py text eol=lf | ||
CMakeLists.txt text eol=lf | ||
*.cmake text eol=lf | ||
*.in text eol=lf | ||
|
||
# Modern tools on Windows can handle Linux LF | ||
# See https://stackoverflow.com/a/13154031/8877 for details | ||
* text=auto eol=lf | ||
*.* text=auto eol=lf | ||
.git?* text=auto eol=lf | ||
|
||
# Leave known Windows-only text files as CR/LF | ||
*.sln text eol=crlf | ||
*.dsw text eol=crlf | ||
*.dsp text eol=crlf | ||
*.vcproj text eol=crlf | ||
*.vcxproj text eol=crlf | ||
*.vcxproj.filters text eol=crlf | ||
*.ruleset text eol=crlf | ||
*.bat text eol=crlf | ||
|
||
###################### | ||
# Known binary files | ||
|
||
# Python builds with WAF | ||
waf binary | ||
|
||
# executables, libraries; yes, sometimes they're part of a repository | ||
*.exe binary | ||
*.out binary | ||
lib*.so* binary | ||
*.dll binary | ||
lib*.a* binary | ||
*.lib binary | ||
*.mex binary | ||
*.pyc binary | ||
|
||
# from various unit_test/ directories | ||
*.dat binary | ||
*.*hdr binary | ||
*.flat binary | ||
*.sig binary | ||
*.bin binary | ||
*.dump binary | ||
|
||
# images | ||
*.bmp binary | ||
*.ico binary | ||
*.tiff binary | ||
*.tif binary | ||
*.gif binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.png binary | ||
# SVG images are XML | ||
*.svg text | ||
*.raw binary | ||
*.hei? binary | ||
*.kmz binary | ||
|
||
# music | ||
*.mp3 binary | ||
*.m4a binary | ||
*.wav binary | ||
*.wma binary | ||
|
||
# video | ||
*.m4v binary | ||
*.avi binary | ||
*.wmv binary | ||
*.mkv binary | ||
|
||
# documents | ||
*.pdf binary | ||
*.dvi binary | ||
*.doc binary | ||
*.docx binary | ||
*.xls binary | ||
*.xlsx binary | ||
*.ppt binary | ||
*.pptx binary | ||
|
||
# SAR | ||
*.h5 binary | ||
*.sio binary | ||
*.hdr binary | ||
*.ntf binary | ||
*.nitf binary | ||
*.sidd binary | ||
*.sicd? binary | ||
|
||
# containers | ||
*.zip binary | ||
*.gz binary | ||
*.tar binary | ||
*.tgz binary | ||
*.jar binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,41 @@ | ||
#include "pch.h" | ||
#include "TestCase.h" | ||
|
||
#include "str/EncodedStringView.h" | ||
|
||
using namespace Microsoft::VisualStudio::CppUnitTestFramework; | ||
|
||
// EQUALS_MESSAGE() wants ToString() specializations (or overloads) for our types, which is a nusiance. | ||
// This hooks up our existing str::toString() into the VC++ unit-test infrastructure | ||
|
||
// C++ hack to call private methods | ||
// https://stackoverflow.com/a/71578383/8877 | ||
|
||
using FailOnCondition_t = void(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare method's type | ||
using GetAssertMessage_t = std::wstring(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare method's type | ||
template <FailOnCondition_t fFailOnCondition, GetAssertMessage_t fGetAssertMessage> | ||
struct caller final // helper structure to inject call() code | ||
{ | ||
friend void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo) | ||
{ | ||
fFailOnCondition(condition, message, pLineInfo); | ||
} | ||
|
||
friend std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message) | ||
{ | ||
return fGetAssertMessage(equality, expected, actual, message); | ||
} | ||
}; | ||
template struct caller<&Assert::FailOnCondition, &Assert::GetAssertMessage>; // even instantiation of the helper | ||
|
||
void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare caller | ||
void test::Assert::FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo) | ||
{ | ||
::FailOnCondition(condition, message, pLineInfo); // and call! | ||
} | ||
|
||
std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare caller | ||
std::wstring test::Assert::GetAssertMessage(bool equality, const std::string& expected, const std::string& actual, const wchar_t *message) | ||
{ | ||
const str::EncodedStringView vExpected(expected); | ||
const str::EncodedStringView vActual(actual); | ||
return ::GetAssertMessage(equality, vExpected.wstring(), vActual.wstring(), message); // and call! | ||
} | ||
#include "pch.h" | ||
#include "TestCase.h" | ||
|
||
#include "str/Encoding.h" | ||
|
||
using namespace Microsoft::VisualStudio::CppUnitTestFramework; | ||
|
||
// EQUALS_MESSAGE() wants ToString() specializations (or overloads) for our types, which is a nusiance. | ||
// This hooks up our existing str::toString() into the VC++ unit-test infrastructure | ||
|
||
// C++ hack to call private methods | ||
// https://stackoverflow.com/a/71578383/8877 | ||
|
||
using FailOnCondition_t = void(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare method's type | ||
using GetAssertMessage_t = std::wstring(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare method's type | ||
template <FailOnCondition_t fFailOnCondition, GetAssertMessage_t fGetAssertMessage> | ||
struct caller final // helper structure to inject call() code | ||
{ | ||
friend void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo) | ||
{ | ||
fFailOnCondition(condition, message, pLineInfo); | ||
} | ||
|
||
friend std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message) | ||
{ | ||
return fGetAssertMessage(equality, expected, actual, message); | ||
} | ||
}; | ||
template struct caller<&Assert::FailOnCondition, &Assert::GetAssertMessage>; // even instantiation of the helper | ||
|
||
void FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo); // declare caller | ||
void test::Assert::FailOnCondition(bool condition, const unsigned short* message, const __LineInfo* pLineInfo) | ||
{ | ||
::FailOnCondition(condition, message, pLineInfo); // and call! | ||
} | ||
|
||
std::wstring GetAssertMessage(bool equality, const std::wstring& expected, const std::wstring& actual, const wchar_t *message); // declare caller | ||
std::wstring test::Assert::GetAssertMessage(bool equality, const std::string& expected, const std::string& actual, const wchar_t *message) | ||
{ | ||
return ::GetAssertMessage(equality, str::details::to_wstring(expected), str::details::to_wstring(actual), message); // and call! | ||
} |
Oops, something went wrong.