Skip to content

Commit

Permalink
Adding new test
Browse files Browse the repository at this point in the history
  • Loading branch information
furuame committed Oct 2, 2023
1 parent 78e6b85 commit aff4e6e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sparta/test/Array/Array_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,19 @@ int main()
for(uint32_t i = 0; i < 4; ++i){
EXPECT_EQUAL(aged_array_test.getAge(i), age_vec_2[idxx++]);
}
// getAge Test4 -- Popping them out and repopulate them
while(aged_array_test.numValid() > 0) {
aged_array_test.erase(aged_array_test.abegin());
}
aged_array_test.write(4, 12);
aged_array_test.write(1, 21);
aged_array_test.write(3, 90);
aged_array_test.write(0, 92);
aged_array_test.write(2, 3);
idxx = 0;
for(uint32_t i = 0; i < 5; ++i){
EXPECT_EQUAL(aged_array_test.getAge(i), age_vec_0[idxx++]);
}

#ifdef PIPEOUT_GEN
sched.run(1);
Expand Down

0 comments on commit aff4e6e

Please sign in to comment.