mavak / trucov

True coverage tool for C / C++
1 stars 1 forks source link

Unit Test Config Class #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description
Test public methods only.

Source files
config.h
config.cpp

Original issue reported on code.google.com by millerlyte87@gmail.com on 24 Aug 2009 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by millerlyte87@gmail.com on 4 Sep 2009 at 11:02

GoogleCodeExporter commented 9 years ago

Original comment by yekyaw.wsu@gmail.com on 23 Sep 2009 at 8:05

GoogleCodeExporter commented 9 years ago
I get a segfault when running the config unit test.

Follow these directions very carefully:

1) cd into root directory of trucov project
2) cd build/
3) rm -rf *
4) cmake ../
5) make test
6) ./config_unittest

We are running all the tests from the build/ directory, not the project root 
directory.

Also: all external files that are used by any test should be located in the
test/resources/ directory, not sample_projects.

Heres the error output:

Running main() from gtest_main.cc
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from Config
[ RUN      ] Config.get_instance
[       OK ] Config.get_instance
[ RUN      ] Config.initialize_wflags
ERROR::Config: /home/millerlyte87/trucov/build/sample_projects/F1 does not 
exist.
ERROR::Config: /home/millerlyte87/trucov/build/sample_projects/F1 does not 
exist.
Source Directories = { };
Build Directories = { };
Output Directory = { /home/millerlyte87/trucov/build/ }
This is report
/home/millerlyte87/trucov/test/unit_test/config_unittest.cpp:258: Failure
Value of: config.get_out_dir()
  Actual: "/home/millerlyte87/trucov/build/"
Expected: proj_dir
Which is: "/home/millerlyte87/trucov/build/sample_projects/F1"
Segmentation fault

Original comment by millerlyte87@gmail.com on 23 Sep 2009 at 7:25

GoogleCodeExporter commented 9 years ago

Original comment by yekyaw.wsu@gmail.com on 7 Oct 2009 at 6:45

GoogleCodeExporter commented 9 years ago

Original comment by millerlyte87@gmail.com on 17 Oct 2009 at 9:03