Skip to content

Commit

Permalink
Add failing clef subscript operator test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoemi09 committed Jan 19, 2024
1 parent a35a31f commit 19661cd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/c++/clef/clef_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ TEST(clef, makefunction) {

// -----------------------

TEST(clef, subscript) {

auto expr = x_[y_];
for (int i = 0; i < 10; ++i) {
auto res = nda::clef::eval(expr, x_ = std::array{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, y_ = i);
EXPECT_EQ(res, i);
}
}

// -----------------------

TEST(clef, makefunctionparametric) {
auto expr = 2 * x_ + 1;
auto r = make_function(expr, x_);
Expand Down

0 comments on commit 19661cd

Please sign in to comment.