-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For some reason had to define ToString() methods as exact template specializations of unit test framework type rather than matching overloads.
- Loading branch information
1 parent
eeed01c
commit d876009
Showing
10 changed files
with
434 additions
and
332 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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#include "unittestwrapper.h" | ||
|
||
#include "matrix.h" | ||
#include "mathio.h" | ||
|
||
namespace Microsoft { | ||
namespace VisualStudio { | ||
namespace CppUnitTestFramework { | ||
template <typename T, size_t M, size_t N> | ||
auto ToStringHelper(const mathlib::Matrix<T, M, N>& x) { | ||
RETURN_WIDE_STRING(x); | ||
} | ||
|
||
template <> | ||
std::wstring ToString<mathlib::Mat4f>(const mathlib::Mat4f& x) { | ||
return ToStringHelper(x); | ||
} | ||
|
||
template <> | ||
std::wstring ToString<mathlib::Matrix<float, 3, 4>>(const mathlib::Matrix<float, 3, 4>& x) { | ||
return ToStringHelper(x); | ||
} | ||
|
||
template <> | ||
std::wstring ToString<mathlib::Matrix<float, 2, 3>>(const mathlib::Matrix<float, 2, 3>& x) { | ||
return ToStringHelper(x); | ||
} | ||
|
||
} // namespace CppUnitTestFramework | ||
} // namespace VisualStudio | ||
} // namespace Microsoft |
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,23 @@ | ||
#pragma once | ||
|
||
#include "unittestwrapper.h" | ||
|
||
#include "quaternion.h" | ||
#include "quaternionio.h" | ||
|
||
namespace Microsoft { | ||
namespace VisualStudio { | ||
namespace CppUnitTestFramework { | ||
template <typename T> | ||
auto ToStringHelper(const mathlib::Quaternion<T>& x) { | ||
RETURN_WIDE_STRING(x); | ||
} | ||
|
||
template <> | ||
std::wstring ToString<mathlib::Quatf>(const mathlib::Quatf& x) { | ||
return ToStringHelper(x); | ||
} | ||
|
||
} // namespace CppUnitTestFramework | ||
} // namespace VisualStudio | ||
} // namespace Microsoft |
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
Oops, something went wrong.