1
|
|
package com.adventofcode.day04 |
2
|
|
|
3
|
4
1. areAllPassportsValidOnes : replaced boolean return with false for com/adventofcode/day04/FullPassportsValidator::areAllPassportsValidOnes → KILLED
2. areAllPassportsValidOnes : replaced boolean return with true for com/adventofcode/day04/FullPassportsValidator::areAllPassportsValidOnes → KILLED
3. asString : replaced return value with "" for com/adventofcode/day04/FullPassportsValidator::asString → KILLED
4. validateAll : replaced return value with Collections.emptyList for com/adventofcode/day04/FullPassportsValidator::validateAll → KILLED
|
class FullPassportsValidator(passports: Collection<Passport>) : PassportsValidator { |
4
|
|
|
5
|
1
1. getInvalidityCause : replaced return value with "" for com/adventofcode/day04/FullPassportsValidator::getInvalidityCause → KILLED
|
override var invalidityCause = "" |
6
|
1
1. getValidationData : replaced return value with Collections.emptyList for com/adventofcode/day04/FullPassportsValidator::getValidationData → KILLED
|
override val validationData = validateAll(passports) |
7
|
|
|
8
|
|
override fun validatePassport(passport: Passport): Boolean { |
9
|
|
|
10
|
2
1. validatePassport : negated conditional → KILLED
2. validatePassport : negated conditional → KILLED
|
val invalidData = passport.data.filter { !it.key.validate(it.value) }.toMap() |
11
|
|
val allValid = invalidData.isEmpty() |
12
|
2
1. validatePassport : replaced boolean return with false for com/adventofcode/day04/FullPassportsValidator::validatePassport → KILLED
2. validatePassport : replaced boolean return with true for com/adventofcode/day04/FullPassportsValidator::validatePassport → KILLED
|
return when { |
13
|
1
1. validatePassport : negated conditional → KILLED
|
allValid -> super.validatePassport(passport) |
14
|
|
else -> { |
15
|
1
1. validatePassport : removed call to com/adventofcode/day04/FullPassportsValidator::setInvalidityCause → KILLED
|
this.invalidityCause = "Found invalid data: $invalidData" |
16
|
|
allValid |
17
|
|
} |
18
|
|
} |
19
|
|
|
20
|
|
} |
21
|
|
|
22
|
|
override fun toString(): String { |
23
|
1
1. toString : replaced return value with "" for com/adventofcode/day04/FullPassportsValidator::toString → KILLED
|
return asString() |
24
|
|
} |
25
|
|
} |
| | Mutations |
3 |
|
1.1 Location : areAllPassportsValidOnes Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldValidatePassportWhenAllFieldsAreCompletedWithValidData()] replaced boolean return with false for com/adventofcode/day04/FullPassportsValidator::areAllPassportsValidOnes → KILLED 2.2 Location : areAllPassportsValidOnes Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldInvalidatePassportWhenSomeDataIsMissing()] replaced boolean return with true for com/adventofcode/day04/FullPassportsValidator::areAllPassportsValidOnes → KILLED 3.3 Location : asString Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldDisplayNumberOfValidData()] replaced return value with "" for com/adventofcode/day04/FullPassportsValidator::asString → KILLED 4.4 Location : validateAll Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldInvalidatePassportWhenSomeDataIsMissing()] replaced return value with Collections.emptyList for com/adventofcode/day04/FullPassportsValidator::validateAll → KILLED
|
5 |
|
1.1 Location : getInvalidityCause Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldGiveInvalidityCauseWhenPassportIsInvalid()] replaced return value with "" for com/adventofcode/day04/FullPassportsValidator::getInvalidityCause → KILLED
|
6 |
|
1.1 Location : getValidationData Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldInvalidatePassportWhenSomeDataIsMissing()] replaced return value with Collections.emptyList for com/adventofcode/day04/FullPassportsValidator::getValidationData → KILLED
|
10 |
|
1.1 Location : validatePassport Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldGiveInvalidityCauseWhenPassportIsInvalid()] negated conditional → KILLED 2.2 Location : validatePassport Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldGiveInvalidityCauseWhenPassportIsInvalid()] negated conditional → KILLED
|
12 |
|
1.1 Location : validatePassport Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldValidatePassportWhenAllFieldsAreCompletedWithValidData()] replaced boolean return with false for com/adventofcode/day04/FullPassportsValidator::validatePassport → KILLED 2.2 Location : validatePassport Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldInvalidatePassportWhenSomeDataIsMissing()] replaced boolean return with true for com/adventofcode/day04/FullPassportsValidator::validatePassport → KILLED
|
13 |
|
1.1 Location : validatePassport Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldGiveInvalidityCauseWhenPassportIsInvalid()] negated conditional → KILLED
|
15 |
|
1.1 Location : validatePassport Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldGiveInvalidityCauseWhenPassportIsInvalid()] removed call to com/adventofcode/day04/FullPassportsValidator::setInvalidityCause → KILLED
|
23 |
|
1.1 Location : toString Killed by : com.adventofcode.day04.PassportScannerWithFullValidationTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerWithFullValidationTest]/[method:shouldDisplayNumberOfValidData()] replaced return value with "" for com/adventofcode/day04/FullPassportsValidator::toString → KILLED
|