Braun Brelin
unread,Jul 26, 2013, 7:08:13 AM7/26/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to googletes...@googlegroups.com
Hello all,
i'm trying to create a simple google test framework like so:
#include "factorial.h"$
2 #include <gtest/gtest.h>$
3 $
4 class factorialTest : public testing::Test {$
5 protected:$
6 TEST_F (factorialTest,negative) {$
7 EXPECT_EQ (1,f.calculate_factorial(-5));$
8 }$
9 factorial f;$
10 };$
11 $
12 int main(int argc, char ** argv) {$
13 testing::InitGoogleTest(&argc,argv);$
14 return(RUN_ALL_TESTS);$
15 }$
The factorial.h header contains the factorial class that I'm trying to test.
I'm getting the following compile time error:
/home/bbrelin/Projects/neueda/src/gtest/factorial_test.cpp:6:5: error: invalid use of incomplete type ‘class factorialTest’
/home/bbrelin/Projects/neueda/src/gtest/factorial_test.cpp:4:7: error: forward declaration of ‘class factorialTest’
Can anybody tell me what I'm doing wrong here?
Thanks,
Braun Brelin