Skip to content

Commit

Permalink
bug fixed (gcc)
Browse files Browse the repository at this point in the history
Signed-off-by: Jerry Guo <[email protected]>
  • Loading branch information
Jerry-Jinfeng-Guo committed Sep 16, 2024
1 parent 9025926 commit bc21719
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/native_api_tests/test_api_serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,16 @@ TEST_CASE("API Serialization and Deserialization") {
ID node_id_2{0};
double node_u_rated_2;
// set buffer
Buffer source_buffer_columnar{PGM_def_input_source, 1};
dataset.set_buffer("node", nullptr, nullptr);
dataset.set_attribute_buffer("node", "id", &node_id_2);
dataset.set_attribute_buffer("node", "u_rated", &node_u_rated_2);
dataset.set_buffer("source", nullptr, source_buffer_2);
dataset.set_buffer("source", nullptr, source_buffer_columnar);
// parse
deserializer.parse_to_buffer();
// check
ID source_2_id;
source_buffer_2.get_value(PGM_def_input_source_id, &source_2_id, -1);
source_buffer_columnar.get_value(PGM_def_input_source_id, &source_2_id, -1);
CHECK(node_id_2 == 5);
CHECK(node_u_rated_2 == doctest::Approx(10.5e3));
CHECK(source_2_id == 6);
Expand Down

0 comments on commit bc21719

Please sign in to comment.