Navigation Menu

Skip to content

Commit

Permalink
2340: fix daikatana common include name (#2341)
Browse files Browse the repository at this point in the history
* 2340: fix daikatana common include name

Fixes #2340

* 2340: Included FGD / DEF parser tests fail if warnings or errors occur during parsing.
  • Loading branch information
ericwa authored and kduske committed Oct 11, 2018
1 parent a9b8d5c commit 1c6062b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/resources/games/Daikatana/Episode 1.fgd
Expand Up @@ -9,7 +9,7 @@
// email me with improvements and suggestions
//

@include "dk_common.fgd"
@include "Common.fgd"


//
Expand Down
2 changes: 1 addition & 1 deletion app/resources/games/Daikatana/Episode 2.fgd
Expand Up @@ -9,7 +9,7 @@
// email me with improvements and suggestions
//

@include "dk_common.fgd"
@include "Common.fgd"


//
Expand Down
2 changes: 1 addition & 1 deletion app/resources/games/Daikatana/Episode 3.fgd
Expand Up @@ -9,7 +9,7 @@
// email me with improvements and suggestions
//

@include "dk_common.fgd"
@include "Common.fgd"


//
Expand Down
2 changes: 1 addition & 1 deletion app/resources/games/Daikatana/Episode 4.fgd
Expand Up @@ -9,7 +9,7 @@
// email me with improvements and suggestions
//

@include "dk_common.fgd"
@include "Common.fgd"


//
Expand Down
6 changes: 3 additions & 3 deletions common/src/IO/ParserStatus.cpp
Expand Up @@ -58,15 +58,15 @@ namespace TrenchBroom {
}

void ParserStatus::info(const size_t line, const String& str) {
log(Logger::LogLevel_Debug, line, str);
log(Logger::LogLevel_Info, line, str);
}

void ParserStatus::warn(const size_t line, const String& str) {
log(Logger::LogLevel_Debug, line, str);
log(Logger::LogLevel_Warn, line, str);
}

void ParserStatus::error(const size_t line, const String& str) {
log(Logger::LogLevel_Debug, line, str);
log(Logger::LogLevel_Error, line, str);
}

void ParserStatus::errorAndThrow(size_t line, const String& str) {
Expand Down
4 changes: 2 additions & 2 deletions test/src/IO/DefParserTest.cpp
Expand Up @@ -44,8 +44,8 @@ namespace TrenchBroom {

TestParserStatus status;
ASSERT_NO_THROW(parser.parseDefinitions(status)) << "Parsing DEF file " << path.asString() << " failed";
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Warn));
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Error));
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Warn)) << "Parsing DEF file " << path.asString() << " produced warnings";
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Error)) << "Parsing DEF file " << path.asString() << " produced errors";
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/src/IO/FgdParserTest.cpp
Expand Up @@ -41,12 +41,12 @@ namespace TrenchBroom {
for (const Path& path : cfgFiles) {
MappedFile::Ptr file = Disk::openFile(path);
const Color defaultColor(1.0f, 1.0f, 1.0f, 1.0f);
FgdParser parser(file->begin(), file->end(), defaultColor);
FgdParser parser(file->begin(), file->end(), defaultColor, path);

TestParserStatus status;
ASSERT_NO_THROW(parser.parseDefinitions(status)) << "Parsing FGD file " << path.asString() << " failed";
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Warn));
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Error));
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Warn)) << "Parsing FGD file " << path.asString() << " produced warnings";
ASSERT_EQ(0u, status.countStatus(Logger::LogLevel_Error)) << "Parsing FGD file " << path.asString() << " produced errors";
}
}

Expand Down

0 comments on commit 1c6062b

Please sign in to comment.