Skip to content

Commit

Permalink
Fix wrong use of material properties table interface in test
Browse files Browse the repository at this point in the history
For const values, we must use GetConstProperty.
  • Loading branch information
gonzaponte committed Nov 7, 2024
1 parent de4fed7 commit 9fe81a7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nain4/test/test-material.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ TEST_CASE("nain material_properties", "[nain][material_properties]") {
.done();

auto mp2 = n4::material_properties()
.add(key_1, mp1 -> GetProperty(key_1))
.add(key_2, mp1 -> GetProperty(key_2))
.add(key_1, mp1 -> GetProperty (key_1))
.add(key_2, mp1 -> GetProperty (key_2))
.add(key_3, mp1 -> GetConstProperty(key_3)) // Must use Const!!!!
.NEW(key_4, mp1 -> GetProperty(key_4))
.NEW(key_5, mp1 -> GetProperty(key_5))
.NEW(key_6, mp1 -> GetProperty(key_6))
.NEW(key_4, mp1 -> GetProperty (key_4))
.NEW(key_5, mp1 -> GetProperty (key_5))
.NEW(key_6, mp1 -> GetConstProperty(key_6)) // Must use Const!!!!
.done();

CHECK( mp2 -> GetProperty(key_1) == mp1 -> GetProperty(key_1) );
Expand Down

0 comments on commit 9fe81a7

Please sign in to comment.