Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] add operator bracket test #335

Merged
merged 1 commit into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ foreach(BACKEND IN ITEMS eigen)
"linalg_copy.cpp"
"linalg_identity_default.cpp"
"linalg_identity.cpp"
"linalg_operator_bracket_1x2.cpp"
"linalg_operator_bracket.cpp"
"linalg_operator_equality.cpp"
"linalg_zero_default.cpp"
"linalg_zero.cpp")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ For more information, please refer to <https://unlicense.org> */

namespace fcarouge::test {
namespace {
//! @test Verifies ...
//! @test Verifies the 1x1 matrix bracket operator.
//!
//! @todo Rewrite this test as a property-based test.
[[maybe_unused]] auto test{[] {
// matrix<double, 1, 2> m;
matrix<> m{42.0};

assert(m(0) == 42.0);
assert(m(0, 0) == 42.0);
assert(m[0] == 42.0);

return 0;
}()};
Expand Down