aboutsummaryrefslogtreecommitdiffstats
path: root/src/util_ut.cpp
blob: 8c5ea295f1edf344fa1d05da3db72b2e8ae4bea0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "util.h"
#include <gtest/gtest.h>

#include <vector>


TEST(Util, SwapArrayTest) {

    double arr[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
    SwapArray(arr, 8);
    for (size_t i = 0; i < 8; ++i) {
        EXPECT_NEAR((double)i, arr[7-i], 0.000000000001);
    }

}