Skip to content

Commit 3174d0c

Browse files
author
Arjun Ramaswami
committed
modify helper test
returned bool instead of int
1 parent 1695c3f commit 3174d0c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_misc.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Author: Arjun Ramaswami
22

33
#include "gtest/gtest.h" // finds this because gtest is linked
4+
#include <stdbool.h>
45

56
extern "C" {
67
#include "CL/opencl.h"
@@ -16,10 +17,10 @@ TEST(HelperTest, CreateValidRandomSpData){
1617
float2 *inp = (float2*)fftfpgaf_complex_malloc(sz, 0);
1718

1819
// sz 0
19-
EXPECT_EQ(fftf_create_data(0, 1), 1);
20+
EXPECT_FALSE(fftf_create_data(0, 1));
2021

2122
// good input
22-
EXPECT_EQ(fftf_create_data(inp, N), 0);
23+
EXPECT_TRUE(fftf_create_data(inp, N));
2324

2425
free(inp);
2526
}
@@ -33,10 +34,10 @@ TEST(HelperTest, CreateValidRandomDpData){
3334
double2 *inp = (double2*)fftfpga_complex_malloc(sz, 0);
3435

3536
// sz 0
36-
EXPECT_EQ(fft_create_data(0, 1), 1);
37+
EXPECT_FALSE(fft_create_data(0, 1));
3738

3839
// good input
39-
EXPECT_EQ(fft_create_data(inp, N), 0);
40+
EXPECT_TRUE(fft_create_data(inp, N));
4041

4142
free(inp);
4243
}

0 commit comments

Comments
 (0)