Skip to content

Commit

Permalink
Fix broken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfis committed Dec 22, 2024
1 parent 1d1db2a commit 4507191
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/test_From_Ruby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ TESTCASE(char_pointer)
char* result = fromRuby.convert(Qnil);
ASSERT_EQUAL(expected, result);

expected = "my string";
result = fromRuby.convert(rb_str_new2(expected));
ASSERT_EQUAL(*expected, *result);
const char* expected2 = "my string";
result = fromRuby.convert(rb_str_new2(expected2));
ASSERT_EQUAL(*expected2, *result);

std::string code = R"(arr = [0, 127, 128, 255, 256, -128, -129, -255])";
Array array = m.instance_eval(code);
Expand Down
4 changes: 2 additions & 2 deletions test/test_Template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ TESTCASE(duplicate_template)
String name = C1.name();
ASSERT_EQUAL("MatrixFirst", name.str());

Class aClass1 = Object(rb_cObject).instance_eval("MatrixFirst");
Object aClass1 = Object(rb_cObject).instance_eval("MatrixFirst");
bool result = aClass1.is_equal(C1);
ASSERT(result);

Expand All @@ -163,7 +163,7 @@ TESTCASE(duplicate_template)
name = C2.name();
ASSERT_EQUAL("MatrixFirst", name.str());

Class aClass2 = Object(rb_cObject).instance_eval("MatrixSecond");
Object aClass2 = Object(rb_cObject).instance_eval("MatrixSecond");
result = aClass2.is_equal(C2);
ASSERT(result);

Expand Down

0 comments on commit 4507191

Please sign in to comment.