Skip to content

Commit a78cc50

Browse files
committed
test: update semver test assertions to reflect fixed version() formatting
AI-Session-Id: c41c8880-cfa0-4088-8df3-c00b3f5c9fb9 AI-Tool: claude-code AI-Model: unknown
1 parent 95defb6 commit a78cc50

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

client/src/test/java/io/split/engine/experiments/RuleBasedSegmentParserTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public void EqualToSemverMatcher() throws IOException {
431431
assertTrue(parsedCondition.label().equals("equal to semver"));
432432
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
433433
// Check the matcher is ALL_KEYS
434-
assertTrue(matcher.matcher().toString().equals(" == semver 1\\.22\\.9"));
434+
assertTrue(matcher.matcher().toString().equals(" == semver 1.22.9"));
435435
return;
436436
}
437437
}
@@ -453,7 +453,7 @@ public void GreaterThanOrEqualSemverMatcher() throws IOException {
453453
assertTrue(parsedCondition.label().equals("greater than or equal to semver"));
454454
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
455455
// Check the matcher is ALL_KEYS
456-
assertTrue(matcher.matcher().toString().equals(" >= semver 1\\.22\\.9"));
456+
assertTrue(matcher.matcher().toString().equals(" >= semver 1.22.9"));
457457
return;
458458
}
459459
}
@@ -475,7 +475,7 @@ public void LessThanOrEqualSemverMatcher() throws IOException {
475475
assertTrue(parsedCondition.label().equals("less than or equal to semver"));
476476
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
477477
// Check the matcher is ALL_KEYS
478-
assertTrue(matcher.matcher().toString().equals(" <= semver 1\\.22\\.9"));
478+
assertTrue(matcher.matcher().toString().equals(" <= semver 1.22.9"));
479479
return;
480480
}
481481
}
@@ -497,7 +497,7 @@ public void BetweenSemverMatcher() throws IOException {
497497
assertTrue(parsedCondition.label().equals("between semver"));
498498
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
499499
// Check the matcher is ALL_KEYS
500-
assertTrue(matcher.matcher().toString().equals(" between semver 1\\.22\\.9 and 2\\.1\\.0"));
500+
assertTrue(matcher.matcher().toString().equals(" between semver 1.22.9 and 2.1.0"));
501501
return;
502502
}
503503
}

client/src/test/java/io/split/engine/experiments/SplitParserTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ public void EqualToSemverMatcher() throws IOException {
561561
assertTrue(parsedCondition.label().equals("equal to semver"));
562562
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
563563
// Check the matcher is ALL_KEYS
564-
assertTrue(matcher.matcher().toString().equals(" == semver 1\\.22\\.9"));
564+
assertTrue(matcher.matcher().toString().equals(" == semver 1.22.9"));
565565
return;
566566
}
567567
}
@@ -583,7 +583,7 @@ public void GreaterThanOrEqualSemverMatcher() throws IOException {
583583
assertTrue(parsedCondition.label().equals("greater than or equal to semver"));
584584
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
585585
// Check the matcher is ALL_KEYS
586-
assertTrue(matcher.matcher().toString().equals(" >= semver 1\\.22\\.9"));
586+
assertTrue(matcher.matcher().toString().equals(" >= semver 1.22.9"));
587587
return;
588588
}
589589
}
@@ -605,7 +605,7 @@ public void LessThanOrEqualSemverMatcher() throws IOException {
605605
assertTrue(parsedCondition.label().equals("less than or equal to semver"));
606606
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
607607
// Check the matcher is ALL_KEYS
608-
assertTrue(matcher.matcher().toString().equals(" <= semver 1\\.22\\.9"));
608+
assertTrue(matcher.matcher().toString().equals(" <= semver 1.22.9"));
609609
return;
610610
}
611611
}
@@ -627,7 +627,7 @@ public void BetweenSemverMatcher() throws IOException {
627627
assertTrue(parsedCondition.label().equals("between semver"));
628628
for (AttributeMatcher matcher : parsedCondition.matcher().attributeMatchers()) {
629629
// Check the matcher is ALL_KEYS
630-
assertTrue(matcher.matcher().toString().equals(" between semver 1\\.22\\.9 and 2\\.1\\.0"));
630+
assertTrue(matcher.matcher().toString().equals(" between semver 1.22.9 and 2.1.0"));
631631
return;
632632
}
633633
}

client/src/test/java/io/split/engine/matchers/SemverTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void testCompareVersions() throws IOException {
108108
}
109109
@Test
110110
public void testLeadingZeros() {
111-
assertTrue(Semver.build("1.01.2").version().equals("1\\.1\\.2"));
112-
assertTrue(Semver.build("1.01.2-rc.01").version().equals("1\\.1\\.2-rc\\.1"));
111+
assertTrue(Semver.build("1.01.2").version().equals("1.1.2"));
112+
assertTrue(Semver.build("1.01.2-rc.01").version().equals("1.1.2-rc.1"));
113113
}
114114
}

0 commit comments

Comments
 (0)