Skip to content

Commit

Permalink
[#375] Rename compatibility_warning test to work for Windows as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Mar 3, 2022
1 parent d037aaa commit d88708e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions test/warnings/compatibility_warning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set(LOG_FILENAME zserio_log.txt)
# clean old log file
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${LOG_FILENAME})

zserio_add_library(TARGET root_with_different_compatibility_warning_zs
zserio_add_library(TARGET root_with_diff_compatibility_warning_zs
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zs
MAIN_SOURCE compatibility_warning/root_with_different_compatibility_warning.zs
MAIN_SOURCE compatibility_warning/root_with_diff_compatibility_warning.zs
OUT_DIR ${ZSERIO_GEN_DIR}
OUT_FILES EMPTY
ZSERIO_CORE_DIR ${ZSERIO_JAR_DIR}
Expand All @@ -28,7 +28,7 @@ zserio_add_library(TARGET root_without_compatibility_warning_zs
EXPECTED_WARNINGS 1
)

add_test_dependencies(root_with_different_compatibility_warning_zs)
add_test_dependencies(root_with_diff_compatibility_warning_zs)
add_test_dependencies(root_without_compatibility_warning_zs)

add_test_sources(
Expand Down
2 changes: 1 addition & 1 deletion test/warnings/compatibility_warning/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<target name="gen" depends="gen.check" unless="compatibility_warning.zs.gen_is_uptodate">
<testGenClean testName="compatibility_warning"/>
<testGen testName="compatibility_warning"
zsFile="compatibility_warning/root_with_different_compatibility_warning.zs">
zsFile="compatibility_warning/root_with_diff_compatibility_warning.zs">
<arg name="withoutCrossExtensionCheck"/>
</testGen>
<testGen testName="compatibility_warning"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CompatibilityWarningTest : public ::testing::Test
const test_utils::ZserioErrorOutput zserioWarnings;
};

TEST_F(CompatibilityWarningTest, rootWithDifferentCompatibility)
TEST_F(CompatibilityWarningTest, rootWithDiffCompatibility)
{
const std::string error = "subpackage.zs:1:30: "
"Package compatibility version '2.4.2' doesn't match to '2.5.0' specified in root package!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void rootWithoutCompatibility()
}

@Test
public void rootWithDifferentCompatibility()
public void rootWithDiffCompatibility()
{
final String warning = "subpackage.zs:1:30: " +
"Package specifies compatibility version '2.4.2' while root package specifies nothing!";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ class CompatibilityWarningTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.warnings = {}
cls.api = getZserioApi(__file__, "compatibility_warning/root_with_different_compatibility_warning.zs",
cls.api = getZserioApi(__file__, "compatibility_warning/root_with_diff_compatibility_warning.zs",
expectedWarnings=1, errorOutputDict=cls.warnings,
extraArgs=["-withoutCrossExtensionCheck"])
cls.api = getZserioApi(__file__, "compatibility_warning/root_without_compatibility_warning.zs",
expectedWarnings=1, errorOutputDict=cls.warnings,
extraArgs=["-withoutCrossExtensionCheck"])

def testRootWithDifferentCompatibility(self):
def testRootWithDiffCompatibility(self):
assertWarningsPresent(self,
"compatibility_warning/root_with_different_compatibility_warning.zs",
"compatibility_warning/root_with_diff_compatibility_warning.zs",
[
"subpackage.zs:1:30: "
"Package compatibility version '2.4.2' doesn't match to '2.5.0' specified in root package!"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
zserio_compatibility_version("2.5.0");

package compatibility_warning.root_with_different_compatibility_warning;
package compatibility_warning.root_with_diff_compatibility_warning;

import compatibility_warning.subpackage.*;

0 comments on commit d88708e

Please sign in to comment.