Skip to content

Commit

Permalink
Fix the test code in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryRLee committed Feb 13, 2019
1 parent 2641099 commit b7007fe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/examples.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "gtest/gtest.h"
#include "fenwick/fenwick.h"
#include <iostream>

TEST(Examples, ExampleOne) {
fenwick::fenwick<int> array(5); // initiate an array with 5 elements
Expand All @@ -9,7 +8,7 @@ TEST(Examples, ExampleOne) {
array[1] = 3;
array[2] = 5;
array[3] = 7;
array[5] = 9;
array[4] = 9;

ASSERT_EQ(array.sum(3), 9); // the sum of the first three elements
ASSERT_EQ(array.sum(1, 4), 15); // the sum of the range [1, 4)
Expand Down

0 comments on commit b7007fe

Please sign in to comment.