Browse Source

Added XCode stuff to .gitignore. Fixed a few tests to compile with clang under -Werror.

tempestpy_adaptions
dehnert 12 years ago
parent
commit
e52379bb54
  1. 12
      .gitignore
  2. 2
      test/parser/ParseMdpTest.cpp
  3. 4
      test/parser/ReadLabFileTest.cpp
  4. 2
      test/parser/ReadTraFileTest.cpp

12
.gitignore

@ -1,8 +1,8 @@
#Third-Party libs
resources/3rdparty/log4cplus-1.1.0/
resources/3rdparty/gtest-1.6.0/
resources/3rdparty/eigen/
resources/3rdparty/gmm-4.2/
##Third-Party libs
resources/3rdparty/log4cplus-1.1.0/**
resources/3rdparty/gtest-1.6.0/**
resources/3rdparty/eigen/**
resources/3rdparty/gmm-4.2/**
#Visual Studio files #Visual Studio files
*.[Oo]bj *.[Oo]bj
*.user *.user
@ -25,6 +25,8 @@ resources/3rdparty/gmm-4.2/
*.sdf *.sdf
*.opensdf *.opensdf
*.unsuccessfulbuild *.unsuccessfulbuild
# XCode directories and files
storm/**
ipch/ ipch/
obj/ obj/
CMakeFiles/ CMakeFiles/

2
test/parser/ParseMdpTest.cpp

@ -12,7 +12,7 @@
#include "src/utility/IoUtility.h" #include "src/utility/IoUtility.h"
TEST(ParseMdpTest, parseAndOutput) { TEST(ParseMdpTest, parseAndOutput) {
storm::parser::MdpParser* mdpParser;
storm::parser::MdpParser* mdpParser = nullptr;
ASSERT_NO_THROW(mdpParser = new storm::parser::MdpParser( ASSERT_NO_THROW(mdpParser = new storm::parser::MdpParser(
STORM_CPP_TESTS_BASE_PATH "/parser/tra_files/mdp_general_input_01.tra", STORM_CPP_TESTS_BASE_PATH "/parser/tra_files/mdp_general_input_01.tra",
STORM_CPP_TESTS_BASE_PATH "/parser/lab_files/pctl_general_input_01.lab")); STORM_CPP_TESTS_BASE_PATH "/parser/lab_files/pctl_general_input_01.lab"));

4
test/parser/ReadLabFileTest.cpp

@ -23,7 +23,7 @@ TEST(ReadLabFileTest, ParseTest) {
//This test is based on a test case from the original MRMC. //This test is based on a test case from the original MRMC.
storm::parser::AtomicPropositionLabelingParser* parser;
storm::parser::AtomicPropositionLabelingParser* parser = nullptr;
//Parsing the file //Parsing the file
ASSERT_NO_THROW(parser = new storm::parser::AtomicPropositionLabelingParser(12, STORM_CPP_TESTS_BASE_PATH "/parser/lab_files/pctl_general_input_01.lab")); ASSERT_NO_THROW(parser = new storm::parser::AtomicPropositionLabelingParser(12, STORM_CPP_TESTS_BASE_PATH "/parser/lab_files/pctl_general_input_01.lab"));
std::shared_ptr<storm::models::AtomicPropositionsLabeling> labeling(parser->getLabeling()); std::shared_ptr<storm::models::AtomicPropositionsLabeling> labeling(parser->getLabeling());
@ -32,7 +32,7 @@ TEST(ReadLabFileTest, ParseTest) {
char phi[] = "phi", psi[] = "psi", smth[] = "smth"; char phi[] = "phi", psi[] = "psi", smth[] = "smth";
if (labeling != NULL) {
if (labeling != nullptr) {
ASSERT_TRUE(labeling->containsAtomicProposition(phi)); ASSERT_TRUE(labeling->containsAtomicProposition(phi));
ASSERT_TRUE(labeling->containsAtomicProposition(psi)); ASSERT_TRUE(labeling->containsAtomicProposition(psi));
ASSERT_TRUE(labeling->containsAtomicProposition(smth)); ASSERT_TRUE(labeling->containsAtomicProposition(smth));

2
test/parser/ReadTraFileTest.cpp

@ -26,7 +26,7 @@ TEST(ReadTraFileTest, ParseFileTest1) {
ASSERT_NO_THROW(parser = new storm::parser::DeterministicSparseTransitionParser(STORM_CPP_TESTS_BASE_PATH "/parser/tra_files/csl_general_input_01.tra")); ASSERT_NO_THROW(parser = new storm::parser::DeterministicSparseTransitionParser(STORM_CPP_TESTS_BASE_PATH "/parser/tra_files/csl_general_input_01.tra"));
std::shared_ptr<storm::storage::SparseMatrix<double>> result = parser->getMatrix(); std::shared_ptr<storm::storage::SparseMatrix<double>> result = parser->getMatrix();
if (result != NULL) {
if (result != nullptr) {
double val = 0; double val = 0;
ASSERT_TRUE(result->getValue(0, 0, &val)); ASSERT_TRUE(result->getValue(0, 0, &val));
ASSERT_EQ(val, 0.0); ASSERT_EQ(val, 0.0);

Loading…
Cancel
Save