From 8b385b7c2d094b34c58835756f00fb3cdc2fbe55 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Thu, 12 Dec 2024 18:20:22 +0100 Subject: [PATCH] monospace length --- README.md | 596 +++++++++--------- .../api/fluent/en_GB/documentationUtils.kt | 3 - .../en_GB/ArrayAsListExpectationsSpec.kt | 2 +- ...eToContainNotToContainExpectationsSpec.kt} | 2 +- .../en_GB/CharSequenceToContainSpecBase.kt | 2 +- .../en_GB/CollectionExpectationsSpec.kt | 2 +- ...FeatureExpectationsBoundedReferenceSpec.kt | 2 +- .../FeatureExpectationsClassReferenceSpec.kt | 2 +- .../fluent/en_GB/IterableExpectationsSpec.kt | 2 +- ...bleNotToContainEntriesExpectationsSpec.kt} | 2 +- ...eNotToHaveElementsOrAllExpectationsSpec.kt | 2 +- ...eNotToHaveElementsOrAnyExpectationsSpec.kt | 2 +- ...NotToHaveElementsOrNoneExpectationsSpec.kt | 2 +- ...OrderAtLeast1ElementsOfExpectationsSpec.kt | 2 +- ...AnyOrderAtLeast1EntriesExpectationsSpec.kt | 2 +- ...nAnyOrderAtLeast1ValuesExpectationsSpec.kt | 2 +- ...nInAnyOrderAtMostValuesExpectationsSpec.kt | 2 +- ...InAnyOrderExactlyValuesExpectationsSpec.kt | 2 +- ...yOrderNotOrAtMostValuesExpectationsSpec.kt | 2 +- ...nAnyOrderOnlyElementsOfExpectationsSpec.kt | 2 +- ...inInAnyOrderOnlyEntriesExpectationsSpec.kt | 2 +- ...ainInAnyOrderOnlyValuesExpectationsSpec.kt | 2 +- ...inInOrderOnlyElementsOfExpectationsSpec.kt | 2 +- ...ntainInOrderOnlyEntriesExpectationsSpec.kt | 2 +- ...OrderOnlyGroupedEntriesExpectationsSpec.kt | 2 +- ...nOrderOnlyGroupedValuesExpectationsSpec.kt | 2 +- ...ontainInOrderOnlyValuesExpectationsSpec.kt | 2 +- ...rableToContainNotValuesExpectationsSpec.kt | 2 +- ...bleToHaveElementsAndAllExpectationsSpec.kt | 2 +- ...bleToHaveElementsAndAnyExpectationsSpec.kt | 2 +- ...leToHaveElementsAndNoneExpectationsSpec.kt | 2 +- .../api/fluent/en_GB/ListExpectationsSpec.kt | 2 +- .../en_GB/MapAsEntriesExpectationsSpec.kt | 2 +- .../fluent/en_GB/MapEntryExpectationsSpec.kt | 2 +- .../api/fluent/en_GB/MapExpectationsSpec.kt | 2 +- ...tainInAnyOrderEntriesOfExpectationsSpec.kt | 2 +- ...ntainInAnyOrderKeyValueExpectationsSpec.kt | 2 +- ...InAnyOrderKeyValuePairsExpectationsSpec.kt | 2 +- ...InAnyOrderOnlyEntriesOfExpectationsSpec.kt | 2 +- ...nInAnyOrderOnlyKeyValueExpectationsSpec.kt | 2 +- ...yOrderOnlyKeyValuePairsExpectationsSpec.kt | 2 +- ...ainInOrderOnlyEntriesOfExpectationsSpec.kt | 2 +- ...tainInOrderOnlyKeyValueExpectationsSpec.kt | 2 +- ...nOrderOnlyKeyValuePairsExpectationsSpec.kt | 2 +- .../api/fluent/en_GB/PairExpectationsSpec.kt | 2 +- .../fluent/en_GB/ThrowableExpectationsSpec.kt | 2 +- .../IterableLikeToContainCheckerSamples.kt | 1 + .../en_GB/ChronoLocalDateExpectationsSpec.kt | 2 +- .../ChronoLocalDateTimeExpectationsSpec.kt | 2 +- .../ChronoZonedDateTimeExpectationsSpec.kt | 5 +- .../en_GB/DateAsLocalDateExpectationsSpec.kt | 2 +- .../DateAsLocalDateTimeExpectationsSpec.kt | 2 +- .../en_GB/FileAsPathExpectationsSpec.kt | 2 +- .../fluent/en_GB/LocalDateExpectationsSpec.kt | 2 +- .../en_GB/LocalDateTimeExpectationsSpec.kt | 2 +- .../fluent/en_GB/OptionalExpectationsSpec.kt | 2 +- .../api/fluent/en_GB/PathExpectationsSpec.kt | 5 +- .../en_GB/ZonedDateTimeExpectationsSpec.kt | 2 +- .../en_GB/ArrayAsListExpectationsSpec.kt | 2 +- .../en_GB/CharSequenceExpectationsSpec.kt | 2 +- ...ceToContainNotToContainExpectationsSpec.kt | 2 +- .../en_GB/CharSequenceToContainSpecBase.kt | 2 +- .../infix/en_GB/CollectionExpectationsSpec.kt | 2 +- ...ctationsBoundedReferenceAlternativeSpec.kt | 2 +- ...FeatureExpectationsBoundedReferenceSpec.kt | 2 +- .../FeatureExpectationsClassReferenceSpec.kt | 2 +- .../infix/en_GB/IterableExpectationsSpec.kt | 2 +- ...eNotToHaveElementsOrAllExpectationsSpec.kt | 2 +- ...eNotToHaveElementsOrAnyExpectationsSpec.kt | 2 +- ...NotToHaveElementsOrNoneExpectationsSpec.kt | 2 +- ...OrderAtLeast1ElementsOfExpectationsSpec.kt | 2 +- ...AnyOrderAtLeast1EntriesExpectationsSpec.kt | 2 +- ...nAnyOrderAtLeast1ValuesExpectationsSpec.kt | 2 +- ...nInAnyOrderAtMostValuesExpectationsSpec.kt | 2 +- ...InAnyOrderExactlyValuesExpectationsSpec.kt | 2 +- ...yOrderNotOrAtMostValuesExpectationsSpec.kt | 2 +- ...nAnyOrderOnlyElementsOfExpectationsSpec.kt | 2 +- ...inInAnyOrderOnlyEntriesExpectationsSpec.kt | 2 +- ...ainInAnyOrderOnlyValuesExpectationsSpec.kt | 2 +- ...inInOrderOnlyElementsOfExpectationsSpec.kt | 2 +- ...ntainInOrderOnlyEntriesExpectationsSpec.kt | 2 +- ...OrderOnlyGroupedEntriesExpectationsSpec.kt | 2 +- ...nOrderOnlyGroupedValuesExpectationsSpec.kt | 2 +- ...ontainInOrderOnlyValuesExpectationsSpec.kt | 2 +- ...bleToHaveElementsAndAllExpectationsSpec.kt | 2 +- ...bleToHaveElementsAndAnyExpectationsSpec.kt | 2 +- ...leToHaveElementsAndNoneExpectationsSpec.kt | 2 +- .../api/infix/en_GB/ListExpectationsSpec.kt | 2 +- .../en_GB/MapAsEntriesExpectationsSpec.kt | 2 +- .../infix/en_GB/MapEntryExpectationsSpec.kt | 2 +- .../api/infix/en_GB/MapExpectationsSpec.kt | 2 +- ...tainInAnyOrderEntriesOfExpectationsSpec.kt | 2 +- ...ntainInAnyOrderKeyValueExpectationsSpec.kt | 2 +- ...InAnyOrderKeyValuePairsExpectationsSpec.kt | 2 +- ...InAnyOrderOnlyEntriesOfExpectationsSpec.kt | 2 +- ...nInAnyOrderOnlyKeyValueExpectationsSpec.kt | 2 +- ...yOrderOnlyKeyValuePairsExpectationsSpec.kt | 2 +- ...ainInOrderOnlyEntriesOfExpectationsSpec.kt | 2 +- ...tainInOrderOnlyKeyValueExpectationsSpec.kt | 2 +- ...nOrderOnlyKeyValuePairsExpectationsSpec.kt | 2 +- .../api/infix/en_GB/PairExpectationsSpec.kt | 2 +- .../infix/en_GB/ThrowableExpectationsSpec.kt | 2 +- .../en_GB/ChronoLocalDateExpectationsSpec.kt | 2 +- .../ChronoLocalDateTimeExpectationsSpec.kt | 2 +- .../ChronoZonedDateTimeExpectationsSpec.kt | 2 +- .../en_GB/DateAsLocalDateExpectionsSpec.kt | 2 +- .../DateAsLocalDateTimeExpectionsSpec.kt | 2 +- .../infix/en_GB/FileAsPathExpectationsSpec.kt | 2 +- .../infix/en_GB/LocalDateExpectationsSpec.kt | 2 +- .../en_GB/LocalDateTimeExpectationsSpec.kt | 2 +- .../infix/en_GB/OptionalExpectationsSpec.kt | 2 +- .../api/infix/en_GB/PathExpectationsSpec.kt | 2 +- .../en_GB/ZonedDateTimeExpectationsSpec.kt | 2 +- atrium-core/api/main/atrium-core.api | 138 +++- .../using-kotlin-1.9-or-newer/atrium-core.api | 140 +++- atrium-core/build.gradle.kts | 8 +- .../assertions/ExplanatoryAssertionGroup.kt | 11 +- .../assertions/InvisibleAssertionGroup.kt | 8 +- .../tutteli/atrium/creating/ErrorMessages.kt | 10 +- .../atrium/creating/impl/BaseExpectImpl.kt | 4 +- .../creating/impl/CollectingExpectImpl.kt | 4 +- .../impl/ComponentFactoryContainerImpl.kt | 15 +- .../creating/proofs/builders/RowBuilder.kt | 5 +- .../proofs/builders/impl/BaseGroupBuilder.kt | 4 +- .../proofs/impl/DefaultDocumentationUtils.kt | 4 +- .../tutteli/atrium/reporting/AtriumError.kt | 7 +- .../reporting/prerendering/text/OutputNode.kt | 2 +- .../text/TextPreRenderController.kt | 37 +- ...ableGroupWithDescriptionTextPreRenderer.kt | 8 +- ...DefaultFeatureProofGroupTextPreRenderer.kt | 9 +- ...tInvisibleLikeProofGroupTextPreRenderer.kt | 7 +- .../DefaultRootProofGroupTextPreRenderer.kt | 6 +- .../text/impl/DefaultRowTextPreRenderer.kt | 16 +- .../impl/DefaultTextElementTextPreRenderer.kt | 7 +- .../DefaultAssertionGroupTextPreRenderer.kt | 12 +- .../reporting/reportables/ErrorMessages.kt | 22 + .../atrium/reporting/reportables/Icon.kt | 1 + .../reporting/reportables/Reportable.kt | 10 +- .../descriptions/DescriptionBasic.kt | 8 + .../DescriptionCharSequenceProof.kt | 2 + .../DescriptionFloatingPointProof.kt | 17 + .../DescriptionIterableLikeProof.kt | 109 ++++ .../descriptions/DescriptionListLikeProof.kt | 11 + .../descriptions/DescriptionResultProof.kt | 20 + .../reportables/descriptions/ErrorMessages.kt | 20 - .../reportables/impl/reportableGroups.kt | 1 + .../reporting/reportables/reportableGroups.kt | 1 + .../text/impl/DefaultTextObjFormatter.kt | 42 +- .../text/impl/DefaultTextReporter.kt | 150 +++-- .../theming/text/MonospaceLengthCalculator.kt | 5 + .../reporting/theming/text/StyledString.kt | 207 +++--- .../reporting/theming/text/TextStyler.kt | 44 +- .../theming/text/TextThemeProvider.kt | 2 +- .../impl/CalculatedMonospaceStyledString.kt | 28 + .../theming/text/impl/DefaultStyledString.kt | 29 - .../text/impl/DefaultTextIconStyler.kt | 79 ++- .../theming/text/impl/DefaultTextStyler.kt | 34 +- .../text/impl/MarkdownTextIconStyler.kt | 27 +- .../MonospaceCalculatorBasedStyledString.kt | 44 ++ .../text/impl/MonospaceLengthPrecalculated.kt | 7 + .../text/impl/MordantBasedThemeProvider.kt | 2 +- .../PrecalculatedMonospaceStyledString.kt | 19 + ...edefinedNoStyleNoLineBreakStyledString.kt} | 25 +- .../StringLengthMonospaceLengthCalculator.kt | 7 + .../atrium/reporting/CreateReportTest.kt | 461 ++++++++++---- .../{AtriumError.kt => AtriumErrorJs.kt} | 7 +- atrium-core/src/jvmMain/java/module-info.java | 1 + .../{AtriumError.kt => AtriumErrorJvm.kt} | 66 +- .../DescriptionBigDecimalProof.kt | 10 +- .../descriptions/DescriptionOptionalProof.kt | 11 + .../descriptions/DescriptionPathProof.kt | 114 ++++ .../reporting/erroradjusters/TestDiff.kt | 27 + .../impl/InAnyOrderEntriesAssertionCreator.kt | 8 +- .../impl/DefaultIterableLikeAssertions.kt | 10 +- .../atrium/logic/impl/containsHelpers.kt | 13 +- .../atrium/specs/AssertionCreatorSpec.kt | 6 +- .../atrium/specs/defaultBulletPoints.kt | 56 +- .../specs/integration/AnyExpectationsSpec.kt | 144 +++-- .../CharSequenceExpectationsSpec.kt | 12 +- ...harSequenceNotToContainExpectationsSpec.kt | 23 +- ...nceNotToContainOrAtMostExpectationsSpec.kt | 19 +- ...equenceToContainAtLeastExpectationsSpec.kt | 23 +- ...SequenceToContainAtMostExpectationsSpec.kt | 17 +- ...equenceToContainExactlyExpectationsSpec.kt | 19 +- ...ceToContainNotToContainExpectationsSpec.kt | 37 +- .../integration/CollectionExpectationsSpec.kt | 14 +- .../integration/FeatureExpectationsSpec.kt | 4 +- .../specs/integration/Fun0ExpectationsSpec.kt | 1 - .../atrium/specs/integration/GroupingTest.kt | 10 +- .../integration/IterableExpectationsSpec.kt | 59 +- ...ableNotToContainEntriesExpectationsSpec.kt | 143 ++--- ...rableNotToContainValuesExpectationsSpec.kt | 73 +-- ...eNotToHaveElementsOrAllExpectationsSpec.kt | 67 +- ...eNotToHaveElementsOrAnyExpectationsSpec.kt | 41 +- ...NotToHaveElementsOrNoneExpectationsSpec.kt | 84 ++- .../IterableToContainEntriesSpecBase.kt | 28 +- ...AnyOrderAtLeast1EntriesExpectationsSpec.kt | 61 +- ...nAnyOrderAtLeast1ValuesExpectationsSpec.kt | 39 +- ...InAnyOrderAtLeastValuesExpectationsSpec.kt | 55 +- ...nInAnyOrderAtMostValuesExpectationsSpec.kt | 52 +- ...InAnyOrderExactlyValuesExpectationsSpec.kt | 55 +- ...yOrderNotOrAtMostValuesExpectationsSpec.kt | 43 +- ...inInAnyOrderOnlyEntriesExpectationsSpec.kt | 107 ++-- ...ainInAnyOrderOnlyValuesExpectationsSpec.kt | 150 +++-- ...ntainInOrderOnlyEntriesExpectationsSpec.kt | 19 +- ...OrderOnlyGroupedEntriesExpectationsSpec.kt | 95 +-- ...nOrderOnlyGroupedValuesExpectationsSpec.kt | 83 +-- ...ontainInOrderOnlyValuesExpectationsSpec.kt | 29 +- .../integration/IterableToContainSpecBase.kt | 59 +- ...bleToHaveElementsAndAllExpectationsSpec.kt | 17 +- ...bleToHaveElementsAndAnyExpectationsSpec.kt | 21 +- ...leToHaveElementsAndNoneExpectationsSpec.kt | 43 +- .../integration/IteratorExpectationsSpec.kt | 4 +- .../KeyValueLikeExpectationsSpec.kt | 8 +- .../specs/integration/ListExpectationsSpec.kt | 4 +- .../specs/integration/MapExpectationsSpec.kt | 6 +- .../MapLikeToContainFormatSpecBase.kt | 60 +- .../integration/MapLikeToContainSpecBase.kt | 11 +- ...ntainInAnyOrderKeyValueExpectationsSpec.kt | 4 +- ...nInAnyOrderOnlyKeyValueExpectationsSpec.kt | 4 +- ...tainInOrderOnlyKeyValueExpectationsSpec.kt | 14 +- ...nOrderOnlyKeyValuePairsExpectationsSpec.kt | 10 +- .../integration/ResultExpectationsSpec.kt | 4 +- .../integration/ThirdPartyExpectationsSpec.kt | 3 +- .../integration/ThrowableExpectationsSpec.kt | 9 +- .../integration/stringTestExpectations.kt | 17 +- .../ch/tutteli/atrium/specs/testUtils.kt | 9 +- .../ch/tutteli/atrium/specs/verbs/VerbSpec.kt | 2 +- .../integration/BigDecimalExpectationsSpec.kt | 2 +- .../ChronoLocalDateExpectationsSpec.kt | 43 +- ...noLocalDateTimeAsStringExpectationsSpec.kt | 39 +- .../ChronoLocalDateTimeExpectationsSpec.kt | 41 +- ...noZonedDateTimeAsStringExpectationsSpec.kt | 39 +- .../ChronoZonedDateTimeExpectationsSpec.kt | 43 +- .../integration/Fun0ExpectationsJvmSpec.kt | 31 +- .../integration/LocalDateExpectationsSpec.kt | 18 +- .../LocalDateTimeExpectationsSpec.kt | 13 +- .../integration/OptionalExpectationsSpec.kt | 14 +- .../specs/integration/PathExpectationsSpec.kt | 361 ++++++----- .../ZonedDateTimeExpectationsSpec.kt | 14 +- .../atrium/translations/DescriptionBasic.kt | 9 + .../DescriptionCollectionExpectation.kt | 4 +- .../DescriptionFloatingPointException.kt | 16 + .../DescriptionIterableLikeExpectation.kt | 135 +++- .../DescriptionListLikeExpectation.kt | 8 + .../DescriptionResultExpectation.kt | 20 + .../atrium/translations/ErrorMessages.kt | 13 +- .../DescriptionOptionalAssertion.kt | 18 +- .../translations/DescriptionPathAssertion.kt | 183 ++++++ 249 files changed, 3903 insertions(+), 2127 deletions(-) rename apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/{CharSequenceToContainNoToContainExpectationsSpec.kt => CharSequenceToContainNotToContainExpectationsSpec.kt} (97%) rename apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/{IterableToContainNotEntriesExpectationsSpec.kt => IterableNotToContainEntriesExpectationsSpec.kt} (98%) create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/ErrorMessages.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionFloatingPointProof.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionIterableLikeProof.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionListLikeProof.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionResultProof.kt delete mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/ErrorMessages.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/impl/CalculatedMonospaceStyledString.kt delete mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/impl/DefaultStyledString.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/impl/MonospaceCalculatorBasedStyledString.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/impl/MonospaceLengthPrecalculated.kt create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/impl/PrecalculatedMonospaceStyledString.kt rename atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/impl/{PredefinedNoStyleStyledString.kt => PredefinedNoStyleNoLineBreakStyledString.kt} (54%) create mode 100644 atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/impl/StringLengthMonospaceLengthCalculator.kt rename atrium-core/src/jsMain/kotlin/ch/tutteli/atrium/reporting/{AtriumError.kt => AtriumErrorJs.kt} (94%) rename atrium-core/src/jvmMain/kotlin/ch/tutteli/atrium/reporting/{AtriumError.kt => AtriumErrorJvm.kt} (56%) create mode 100644 atrium-core/src/jvmMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionOptionalProof.kt create mode 100644 atrium-core/src/jvmMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionPathProof.kt create mode 100644 atrium-core/src/jvmTest/kotlin/ch/tutteli/atrium/reporting/erroradjusters/TestDiff.kt diff --git a/README.md b/README.md index 0733821415..0fd376ab92 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ expect(x).toEqual(9) ```text I expected subject : 10 -✘ to equal : 9 +🚫️ to equal : 9 ``` @@ -212,7 +212,7 @@ expect(4 + 6).toBeLessThan(5).toBeGreaterThan(10) ```text I expected subject : 10 -✘ to be less than : 5 +🚫️ to be less than : 5 ``` @@ -249,9 +249,9 @@ expect(4 + 6) { ↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/test/kotlin/readme/examples/MostExamples.kt#L33)[Output](#ex-group) ```text -I expected subject : 10 -✘ to be less than : 5 -✘ to be greater than : 10 +I expected subject : 10 +🚫️ to be less than : 5 +🚫️ to be greater than : 10 ``` @@ -347,9 +347,9 @@ expect { ```text I expected subject : () -> kotlin.Nothing (readme.examples.ToThrowExamples$ex-toThrow1$1 <1234789>) -✘ ▶ thrown exception when called : java.lang.IllegalArgumentException - ✘ to be an instance of type : IllegalStateException (java.lang.IllegalStateException) - ℹ️ Properties of the unexpected IllegalArgumentException +🚩️ ▶ thrown exception when called : java.lang.IllegalArgumentException + 🚫️ to be an instance of type : IllegalStateException (java.lang.IllegalStateException) + ℹ️ Properties of the unexpected IllegalArgumentException » message : "name is empty" » stacktrace : • readme.examples.ToThrowExamples$ex-toThrow1$1.invoke(ToThrowExamples.kt:18) @@ -389,10 +389,10 @@ expect { ```text I expected subject : () -> kotlin.Nothing (readme.examples.ToThrowExamples$ex-toThrow2$1 <1234789>) -✘ ▶ thrown exception when called : java.lang.IllegalArgumentException - ✘ ▶ message : null - ✘ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String - » to start with : "firstName" +🚩️ ▶ thrown exception when called : java.lang.IllegalArgumentException + 🚩️ ▶ message : null + 🚫️ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String + » to start with : "firstName" ``` @@ -410,9 +410,9 @@ expect { ```text I expected subject : () -> kotlin.Nothing (readme.examples.ToThrowExamples$ex-toThrow3$1 <1234789>) -✘ ▶ thrown exception when called : java.lang.IllegalArgumentException - ✘ ▶ message : null - ✘ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String +🚩️ ▶ thrown exception when called : java.lang.IllegalArgumentException + 🚩️ ▶ message : null + 🚫️ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String ``` @@ -433,8 +433,8 @@ expect { ```text I expected subject : () -> kotlin.Nothing (readme.examples.ToThrowExamples$ex-notToThrow$1 <1234789>) -✘ ▶ invoke() : ❗❗ threw java.lang.IllegalArgumentException - ℹ️ Properties of the unexpected IllegalArgumentException +🚩️ ▶ invoke() : ❗❗ threw java.lang.IllegalArgumentException + ℹ️ Properties of the unexpected IllegalArgumentException » message : "name is empty" » stacktrace : • readme.examples.ToThrowExamples$ex-notToThrow$1.invoke(ToThrowExamples.kt:42) @@ -504,8 +504,8 @@ expect(myPerson) ```text I expected subject : Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorExamples.Person <1234789>) -✘ ▶ its.definedIn(FeatureExtractorExamples.kt:35) : false - ✘ to equal : true +🚩️ ▶ its.definedIn(FeatureExtractorExamples.kt:35) : false + 🚫️ to equal : true ``` @@ -549,11 +549,11 @@ Feature extractors follow the common pattern of having two overloads: ```text I expected subject : Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorExamples.Person <1234789>) - ✘ ▶ its.definedIn(FeatureExtractorExamples.kt:45) : "Robert" - ✘ to start with : "Pe" - ✘ to end with : "er" - ✘ ▶ its.definedIn(FeatureExtractorExamples.kt:51) : "Stoll" - ✘ to equal : "Dummy" + 🚩️ ▶ its.definedIn(FeatureExtractorExamples.kt:45) : "Robert" + 🚫️ to start with : "Pe" + 🚫️ to end with : "er" + 🚩️ ▶ its.definedIn(FeatureExtractorExamples.kt:51) : "Stoll" + 🚫️ to equal : "Dummy" ``` @@ -577,8 +577,8 @@ expect(myPerson) ```text I expected subject : Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorExamples.Person <1234789>) -✘ ▶ isStudent : false - ✘ to equal : true +🚩️ ▶ isStudent : false + 🚫️ to equal : true ``` @@ -620,11 +620,11 @@ expect(myPerson) { // forms an expectation-group ```text I expected subject : Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorExamples.Person <1234789>) -✘ ▶ firstName : "Robert" - ✘ to start with : "Pe" - ✘ to end with : "er" -✘ ▶ lastName : "Stoll" - ✘ to equal : "Dummy" +🚩️ ▶ firstName : "Robert" + 🚫️ to start with : "Pe" + 🚫️ to end with : "er" +🚩️ ▶ lastName : "Stoll" + 🚫️ to equal : "Dummy" ``` @@ -669,8 +669,8 @@ expect(myPerson) ```text I expected subject : Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorExamples.Person <1234789>) -✘ ▶ nickname(false) : "Mr. Robert" - ✘ to equal : "Robert aka. Stoll" +🚩️ ▶ nickname(false) : "Mr. Robert" + 🚫️ to equal : "Robert aka. Stoll" ``` @@ -711,8 +711,8 @@ expect(myFamily) ```text I expected subject : Family(members=[FamilyMember(name=Robert)]) (readme.examples.FeatureExtractorExamples.Family <1234789>) -✘ ▶ the first member's name : "Robert" - ✘ to equal : "Peter" +🚩️ ▶ the first member's name : "Robert" + 🚫️ to equal : "Peter" ``` @@ -759,11 +759,11 @@ expect(listOf(1 to "a", 2 to "b")).get(10) { ```text I expected subject : [(1, a), (2, b)] (java.util.Arrays.ArrayList <1234789>) -✘ ▶ get(10) : ❗❗ Index out of bounds - » ▶ CANNOT show description as it is based on subject which is not defined : - • to equal : 1 - » ▶ first : - • to equal : 1 +🚩️ ▶ get(10) : ❗❗ Index out of bounds + » ▶ CANNOT show description as it is based on subject which is not defined : + • to equal : 1 + » ▶ first : + • to equal : 1 ``` @@ -879,10 +879,10 @@ expect(x).toBeAnInstanceOf { ```text I expected subject : SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>) -✘ ▶ word : "hello" - ✘ to equal : "goodbye" -✘ ▶ flag : true - ✘ to equal : false +🚩️ ▶ word : "hello" + 🚫️ to equal : "goodbye" +🚩️ ▶ flag : true + 🚫️ to equal : false ``` @@ -902,8 +902,8 @@ expect(x).toBeAnInstanceOf() ↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/test/kotlin/readme/examples/MostExamples.kt#L67)[Output](#ex-type-expectations-2) ```text -I expected subject : SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>) -✘ to be an instance of type : SubType1 (readme.examples.SubType1) +I expected subject : SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>) +🚫️ to be an instance of type : SubType1 (readme.examples.SubType1) ``` @@ -933,7 +933,7 @@ expect(slogan1).toEqual(null) ```text I expected subject : "postulating expectations made easy" -✘ to equal : null +🚫️ to equal : null ``` @@ -947,7 +947,7 @@ expect(slogan2).toEqual("postulating expectations made easy") ```text I expected subject : null -✘ to equal : "postulating expectations made easy" +🚫️ to equal : "postulating expectations made easy" ``` @@ -967,8 +967,8 @@ expect(slogan2) // subject has type String? ↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/test/kotlin/readme/examples/MostExamples.kt#L85)[Output](#ex-nullable-3) ```text -I expected subject : null -✘ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String +I expected subject : null +🚫️ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String ``` @@ -984,9 +984,9 @@ expect(slogan2).notToEqualNull { toStartWith("atrium") } ↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/test/kotlin/readme/examples/MostExamples.kt#L91)[Output](#ex-nullable-4) ```text -I expected subject : null -✘ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String - » to start with : "atrium" +I expected subject : null +🚫️ not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String + » to start with : "atrium" ``` @@ -1027,9 +1027,9 @@ expect(listOf(1, 2, 2, 4)).toContain(2, 3) ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ to contain, in any order : - ✘ an element which equals : 3 - » but no such element was found +🚩️ to contain, in any order : + 🚩️ an element which equals : 3 + » but no such element was found ``` @@ -1065,14 +1065,14 @@ expect(listOf(1, 2, 2, 4)).toContain( ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ to contain, in any order : - ✘ an element which needs : - » to be less than : 0 - » but no such element was found - ✘ an element which needs : - » to be greater than : 2 - » to be less than : 4 - » but no such element was found +🚩️ to contain, in any order : + 🚩️ an element which needs : + » to be less than : 0 + » but no such element was found + 🚩️ an element which needs : + » to be greater than : 2 + » to be less than : 4 + » but no such element was found ``` @@ -1107,10 +1107,10 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndAny { ```text I expected subject : [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) -✘ to contain, in any order : - ✘ an element which needs : - » to be less than : 0 - » but no such element was found +🚩️ to contain, in any order : + 🚩️ an element which needs : + » to be less than : 0 + » but no such element was found ```
@@ -1125,12 +1125,12 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndNone { ```text I expected subject : [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) -✘ not to contain : - ✘ an element which needs : - » to be greater than : 2 - ❗❗ following elements were mismatched : - • index 2 : 3 - • index 3 : 4 +🚩️ not to contain : + 🚩️ an element which needs : + » to be greater than : 2 + ❗❗ following elements were mismatched : + • index 2 : 3 + • index 3 : 4 ```
@@ -1145,11 +1145,11 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndAll { ```text I expected subject : [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) -✘ elements need all : - » to be greater than : 2 - ❗❗ following elements were mismatched : - • index 0 : 1 - • index 1 : 2 +🚩️ elements need all : + » to be greater than : 2 + ❗❗ following elements were mismatched : + • index 0 : 1 + • index 1 : 2 ``` @@ -1175,16 +1175,16 @@ expect(listOf(1, 2, 2, 4)).toContain.inOrder.only.entries({ toBeLessThan(3) }, { ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ ▶ size : 4 - ✘ to equal : 2 -✘ to contain only, in order : - ✔ ▶ element 0 : 1 - ✔ to be less than : 3 - ✘ ▶ element 1 : 2 - ✘ to be less than : 2 - ❗❗ additional elements detected : - • element 2 : 2 - • element 3 : 4 +🚩️ ▶ size : 4 + 🚫️ to equal : 2 +🚩️ to contain only, in order : + ✔ ▶ element 0 : 1 + ✔ to be less than : 3 + 🚩️ ▶ element 1 : 2 + 🚫️ to be less than : 2 + ❗❗ additional elements detected : + • element 2 : 2 + • element 3 : 4 ``` @@ -1221,13 +1221,13 @@ expect(listOf(1, 2, 2, 4)).toContainExactly( ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ ▶ size : 4 - ✘ to equal : 3 -✘ to contain only, in order : - ✘ ▶ element 1 : 2 - ✘ to be less than : 2 - ❗❗ additional elements detected : - • element 3 : 4 +🚩️ ▶ size : 4 + 🚫️ to equal : 3 +🚩️ to contain only, in order : + 🚩️ ▶ element 1 : 2 + 🚫️ to be less than : 2 + ❗❗ additional elements detected : + • element 3 : 4 ``` @@ -1252,19 +1252,19 @@ expect(listOf(1, 2, 2, 4)).toContain.inOrder.only.values(1, 2, 2, 3, 4) ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ ▶ size : 4 - ✘ to equal : 5 -✘ to contain only, in order : - ✔ ▶ element 0 : 1 - ✔ to equal : 1 - ✔ ▶ element 1 : 2 - ✔ to equal : 2 - ✔ ▶ element 2 : 2 - ✔ to equal : 2 - ✘ ▶ element 3 : 4 - ✘ to equal : 3 - ✘ ▶ element 4 : ❗❗ hasNext() returned false - » to equal : 4 +🚩️ ▶ size : 4 + 🚫️ to equal : 5 +🚩️ to contain only, in order : + ✔ ▶ element 0 : 1 + ✔ to equal : 1 + ✔ ▶ element 1 : 2 + ✔ to equal : 2 + ✔ ▶ element 2 : 2 + ✔ to equal : 2 + 🚩️ ▶ element 3 : 4 + 🚫️ to equal : 3 + 🚩️ ▶ element 4 : ❗❗ hasNext() returned false + » to equal : 4 ```
@@ -1277,11 +1277,11 @@ expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.atLeast(1).butAtMost(2).entries( ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ to contain, in any order : - ✘ an element which needs : - » to be less than : 3 - ✘ ▶ number of such elements : 3 - ✘ is at most : 2 +🚩️ to contain, in any order : + 🚩️ an element which needs : + » to be less than : 3 + 🚩️ ▶ number of such elements : 3 + 🚫️ is at most : 2 ```
@@ -1294,13 +1294,13 @@ expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.only.values(1, 2, 3, 4) ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ to contain only, in any order : - ✔ an element which equals : 1 - ✔ an element which equals : 2 - ✘ an element which equals : 3 - ✔ an element which equals : 4 - ❗❗ following elements were mismatched : - • 2 +🚩️ to contain only, in any order : + ✔ an element which equals : 1 + ✔ an element which equals : 2 + 🚫️ an element which equals : 3 + ✔ an element which equals : 4 + ❗❗ following elements were mismatched : + • 2 ```
@@ -1313,14 +1313,14 @@ expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.only.values(4, 3, 2, 2, 1) ```text I expected subject : [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) -✘ ▶ size : 4 - ✘ to equal : 5 -✘ to contain only, in any order : - ✔ an element which equals : 4 - ✘ an element which equals : 3 - ✔ an element which equals : 2 - ✔ an element which equals : 2 - ✔ an element which equals : 1 +🚩️ ▶ size : 4 + 🚫️ to equal : 5 +🚩️ to contain only, in any order : + ✔ an element which equals : 4 + 🚫️ an element which equals : 3 + ✔ an element which equals : 2 + ✔ an element which equals : 2 + ✔ an element which equals : 1 ``` @@ -1347,11 +1347,11 @@ expect(mapOf("a" to 1, "b" to 2)).toContain("c" to 2, "a" to 1, "b" to 1) ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ to contain, in any order : - ✘ ▶ entry "c" : ❗❗ key does not exist - » to equal : 2 - ✘ ▶ entry "b" : 2 - ✘ to equal : 1 +🚩️ to contain, in any order : + 🚩️ ▶ entry "c" : ❗❗ key does not exist + » to equal : 2 + 🚩️ ▶ entry "b" : 2 + 🚫️ to equal : 1 ``` @@ -1371,13 +1371,13 @@ expect(mapOf("a" to 1, "b" to 2)).toContain( ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ to contain, in any order : - ✘ ▶ entry "c" : ❗❗ key does not exist - » to equal : 2 - ✘ ▶ entry "a" : 1 - ✘ to be greater than : 2 - ✘ ▶ entry "b" : 2 - ✘ to be less than : 2 +🚩️ to contain, in any order : + 🚩️ ▶ entry "c" : ❗❗ key does not exist + » to equal : 2 + 🚩️ ▶ entry "a" : 1 + 🚫️ to be greater than : 2 + 🚩️ ▶ entry "b" : 2 + 🚫️ to be less than : 2 ``` @@ -1393,13 +1393,13 @@ expect(mapOf("a" to 1, "b" to 2)).toContainOnly("b" to 2) ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ ▶ size : 2 - ✘ to equal : 1 -✘ to contain only, in any order : - ✔ ▶ entry "b" : 2 - ✔ to equal : 2 - ❗❗ additional entries detected : - • entry "a" : 1 +🚩️ ▶ size : 2 + 🚫️ to equal : 1 +🚩️ to contain only, in any order : + ✔ ▶ entry "b" : 2 + ✔ to equal : 2 + ❗❗ additional entries detected : + • entry "a" : 1 ``` @@ -1418,15 +1418,15 @@ expect(mapOf("a" to 1, "b" to 2)).toContainOnly( ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ ▶ size : 2 - ✘ to equal : 3 -✘ to contain only, in any order : - ✘ ▶ entry "c" : ❗❗ key does not exist - » to equal : 2 - ✔ ▶ entry "a" : 1 - ✔ to be less than : 2 - ✘ ▶ entry "b" : 2 - ✘ to be less than : 2 +🚩️ ▶ size : 2 + 🚫️ to equal : 3 +🚩️ to contain only, in any order : + 🚩️ ▶ entry "c" : ❗❗ key does not exist + » to equal : 2 + ✔ ▶ entry "a" : 1 + ✔ to be less than : 2 + 🚩️ ▶ entry "b" : 2 + 🚫️ to be less than : 2 ``` @@ -1446,17 +1446,17 @@ expect(mapOf("a" to 1, "b" to 2)).toContain.inOrder.only.entries("b" to 2, "a" t ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ to contain only, in order : - ✘ ▶ element 0 : a=1 (java.util.LinkedHashMap.Entry <1234789>) - ✘ ▶ key : "a" - ✘ to equal : "b" - ✘ ▶ value : 1 - ✘ to equal : 2 - ✘ ▶ element 1 : b=2 (java.util.LinkedHashMap.Entry <1234789>) - ✘ ▶ key : "b" - ✘ to equal : "a" - ✘ ▶ value : 2 - ✘ to equal : 1 +🚩️ to contain only, in order : + 🚩️ ▶ element 0 : a=1 (java.util.LinkedHashMap.Entry <1234789>) + 🚩️ ▶ key : "a" + 🚫️ to equal : "b" + 🚩️ ▶ value : 1 + 🚫️ to equal : 2 + 🚩️ ▶ element 1 : b=2 (java.util.LinkedHashMap.Entry <1234789>) + 🚩️ ▶ key : "b" + 🚫️ to equal : "a" + 🚩️ ▶ value : 2 + 🚫️ to equal : 1 ``` @@ -1473,17 +1473,17 @@ expect(mapOf("a" to 1, "b" to 2)).toContain.inOrder.only.entries( ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ to contain only, in order : - ✔ ▶ element 0 : a=1 (java.util.LinkedHashMap.Entry <1234789>) - ✔ ▶ key : "a" - ✔ to equal : "a" - ✔ ▶ value : 1 - ✔ to be less than : 2 - ✘ ▶ element 1 : b=2 (java.util.LinkedHashMap.Entry <1234789>) - ✔ ▶ key : "b" - ✔ to equal : "b" - ✘ ▶ value : 2 - ✘ to be less than : 2 +🚩️ to contain only, in order : + ✔ ▶ element 0 : a=1 (java.util.LinkedHashMap.Entry <1234789>) + ✔ ▶ key : "a" + ✔ to equal : "a" + ✔ ▶ value : 1 + ✔ to be less than : 2 + 🚩️ ▶ element 1 : b=2 (java.util.LinkedHashMap.Entry <1234789>) + ✔ ▶ key : "b" + ✔ to equal : "b" + 🚩️ ▶ value : 2 + 🚫️ to be less than : 2 ``` @@ -1510,9 +1510,9 @@ expect(mapOf("bernstein" to bernstein)) ```text I expected subject : {bernstein=Person(firstName=Leonard, lastName=Bernstein, age=50)} (java.util.Collections.SingletonMap <1234789>) -✘ ▶ get("bernstein") : Person(firstName=Leonard, lastName=Bernstein, age=50) (readme.examples.MapExamples.Person <1234789>) - ✘ ▶ age : 50 - ✘ to equal : 60 +🚩️ ▶ get("bernstein") : Person(firstName=Leonard, lastName=Bernstein, age=50) (readme.examples.MapExamples.Person <1234789>) + 🚩️ ▶ age : 50 + 🚫️ to equal : 60 ``` @@ -1530,17 +1530,17 @@ expect(mapOf("a" to 1, "b" to 2)) { ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ ▶ keys : [a, b] (java.util.LinkedHashMap.LinkedKeySet <1234789>) - ✘ elements need all : - » to start with : "a" - ❗❗ following elements were mismatched : - • index 1 : "b" -✘ ▶ values : [1, 2] (java.util.LinkedHashMap.LinkedValues <1234789>) - ✘ not to contain : - ✘ an element which needs : - » to be greater than : 1 +🚩️ ▶ keys : [a, b] (java.util.LinkedHashMap.LinkedKeySet <1234789>) + 🚩️ elements need all : + » to start with : "a" ❗❗ following elements were mismatched : - • index 1 : 2 + • index 1 : "b" +🚩️ ▶ values : [1, 2] (java.util.LinkedHashMap.LinkedValues <1234789>) + 🚩️ not to contain : + 🚩️ an element which needs : + » to be greater than : 1 + ❗❗ following elements were mismatched : + • index 1 : 2 ``` @@ -1566,17 +1566,17 @@ expect(linkedMapOf("a" to 1, "b" to 2)).asEntries().toContain.inOrder.only.entri ```text I expected subject : {a=1, b=2} (java.util.LinkedHashMap <1234789>) -✘ to contain only, in order : - ✔ ▶ element 0 : a=1 (java.util.LinkedHashMap.Entry <1234789>) - ✔ ▶ key : "a" - ✔ to equal : "a" - ✔ ▶ value : 1 - ✔ to equal : 1 - ✘ ▶ element 1 : b=2 (java.util.LinkedHashMap.Entry <1234789>) - ✘ ▶ key : "b" - ✘ to start with : "a" - ✘ ▶ value : 2 - ✘ to be greater than : 2 +🚩️ to contain only, in order : + ✔ ▶ element 0 : a=1 (java.util.LinkedHashMap.Entry <1234789>) + ✔ ▶ key : "a" + ✔ to equal : "a" + ✔ ▶ value : 1 + ✔ to equal : 1 + 🚩️ ▶ element 1 : b=2 (java.util.LinkedHashMap.Entry <1234789>) + 🚩️ ▶ key : "b" + 🚫️ to start with : "a" + 🚩️ ▶ value : 2 + 🚫️ to be greater than : 2 ``` @@ -1604,8 +1604,8 @@ expect(Paths.get("/usr/bin/noprogram")).toExist() ```text I expected subject : /usr/bin/noprogram (sun.nio.fs.UnixPath <1234789>) -✘ to : exist - » the closest existing parent directory is /usr/bin +🚩️ to : exist + » the closest existing parent directory is /usr/bin ``` @@ -1620,11 +1620,11 @@ expect(Paths.get("/root/.ssh/config")).toBeWritable() ```text I expected subject : /root/.ssh/config (sun.nio.fs.UnixPath <1234789>) -✘ to be : writable - » failure at parent path : /root (sun.nio.fs.UnixPath <1234789>) - » access was denied - » the owner is root, the group is root - » the permissions are u=rwx g= o= +🚩️ to be : writable + » failure at parent path : /root (sun.nio.fs.UnixPath <1234789>) + » access was denied + » the owner is root, the group is root + » the permissions are u=rwx g= o= ``` @@ -1643,10 +1643,10 @@ expect(filePointer.resolve("subfolder/file")).toBeARegularFile() ```text I expected subject : /tmp/atrium-path/directory/subfolder/file (sun.nio.fs.UnixPath <1234789>) -✘ to be : a file - » followed the symbolic link /tmp/atrium-path/directory to /tmp/atrium-path/file - » failure at parent path : /tmp/atrium-path/file (sun.nio.fs.UnixPath <1234789>) - » was a file instead of a directory +🚩️ to be : a file + » followed the symbolic link /tmp/atrium-path/directory to /tmp/atrium-path/file + » failure at parent path : /tmp/atrium-path/file (sun.nio.fs.UnixPath <1234789>) + » was a file instead of a directory ``` @@ -1667,11 +1667,11 @@ expect("filename?") ```text I expected subject : "filename?" -✘ not to contain : - ✘ value : "?" - ✘ ▶ number of matches : 1 - ✘ to equal : 0 -ℹ️ because : ? is not allowed in file names on Windows +🚩️ not to contain : + 🚩️ value : "?" + 🚩️ ▶ number of matches : 1 + 🚫️ to equal : 0 +ℹ️ because ? is not allowed in file names on Windows ``` @@ -1728,10 +1728,10 @@ expect(listOf(1, 2, 3, -1)).toHaveElementsAndAll { ```text I expected subject : [1, 2, 3, -1] (java.util.Arrays.ArrayList <1234789>) -✘ elements need all : - » not to be : negative - ❗❗ following elements were mismatched : - • index 3 : -1 +🚩️ elements need all : + » not to be : negative + ❗❗ following elements were mismatched : + • index 3 : -1 ``` @@ -1761,8 +1761,8 @@ expect(-10).notToBeNegative() ```text I expected subject : -10 -✘ not to be : negative - ℹ️ Properties of the unexpected AssertionError +🚩️ not to be : negative + ℹ️ Properties of the unexpected AssertionError » message : """ Expecting actual: @@ -1811,7 +1811,7 @@ expect(-10).notToBeNegative() ```text I expected subject : -10 -✘ not to be : negative +🚫️ not to be : negative ``` @@ -1851,12 +1851,12 @@ expectGrouped { ```text my expectations : -✘ calling myFun with 1 : - ✘ ▶ I expected subject : 'b' - ✘ to equal : 'a' -✘ calling myFun with 3 : - ✘ ▶ I expected subject : 'd' - ✘ to equal : 'e' +🚩️ calling myFun with 1 : + 🚩️ ▶ I expected subject : 'b' + 🚫️ to equal : 'a' +🚩️ calling myFun with 3 : + 🚩️ ▶ I expected subject : 'd' + 🚫️ to equal : 'e' ``` @@ -1894,9 +1894,9 @@ expectGrouped { ```text my expectations : -✘ calling myFun with 3 : - ✘ ▶ I expected subject : 'd' - ✘ to be greater than : 'e' +🚩️ calling myFun with 3 : + 🚩️ ▶ I expected subject : 'd' + 🚫️ to be greater than : 'e' ``` @@ -1939,18 +1939,18 @@ expectGrouped { ```text my expectations : -✘ first group : - ✘ ▶ I expected subject : 1 - ✘ to equal : 2 - ✘ sub-group : - ✘ ▶ I expected subject : 3 - ✘ to be greater than : 5 -✘ second group : - ✘ ▶ I expected subject : 6 - ✘ sub-group 1 : - ✘ to be less than : 5 - ✘ sub-group 2 : - ✘ not to equal : 6 +🚩️ first group : + 🚩️ ▶ I expected subject : 1 + 🚫️ to equal : 2 + 🚩️ sub-group : + 🚩️ ▶ I expected subject : 3 + 🚫️ to be greater than : 5 +🚩️ second group : + 🚩️ ▶ I expected subject : 6 + 🚩️ sub-group 1 : + 🚫️ to be less than : 5 + 🚩️ sub-group 2 : + 🚫️ not to equal : 6 ``` @@ -1986,14 +1986,14 @@ expectGrouped { ```text my expectations : -✘ calling myFun with -2147483648 : - ✘ ▶ I expected subject : null - » to contain : - • value : "min" - » but no match was found -✘ calling myFun with 2147483647 : - ✘ ▶ I expected subject : "2147483647" - ✘ to equal : "max" +🚩️ calling myFun with -2147483648 : + 🚩️ ▶ I expected subject : null + » to contain : + • value : "min" + » but no match was found +🚩️ calling myFun with 2147483647 : + 🚩️ ▶ I expected subject : "2147483647" + 🚫️ to equal : "max" ``` @@ -2050,15 +2050,15 @@ also states which entries were additionally contained in the list: ```text I expected subject : [1, 2, 3] (java.util.Arrays.ArrayList <1234789>) -✘ ▶ size : 3 - ✘ to equal : 2 -✘ to contain only, in order : - ✔ ▶ element 0 : 1 - ✔ to equal : 1 - ✘ ▶ element 1 : 2 - ✘ to equal : 3 - ❗❗ additional elements detected : - • element 2 : 3 +🚩️ ▶ size : 3 + 🚫️ to equal : 2 +🚩️ to contain only, in order : + ✔ ▶ element 0 : 1 + ✔ to equal : 1 + 🚩️ ▶ element 1 : 2 + 🚫️ to equal : 3 + ❗❗ additional elements detected : + • element 2 : 3 ``` @@ -2080,9 +2080,9 @@ But Atrium shows where it goes wrong and even gives a possible hint: ```text I expected subject : 9.99 -✘ to equal (error ± 0.01) : 10.0 - » failure might be due to using kotlin.Float, see exact check on the next line - » exact check was |9.989999771118164 - 10.0| = 0.010000228881835938 ≤ 0.009999999776482582 +🚩️ to equal (error ± 0.01) : 10.0 + » failure might be due to using kotlin.Float, see exact check on the next line + » exact check was |9.989999771118164 - 10.0| = 0.010000228881835938 ≤ 0.009999999776482582 ``` @@ -2105,14 +2105,14 @@ expect { ```text I expected subject : () -> kotlin.Nothing (readme.examples.MostExamples$ex-add-info-3$1 <1234789>) -✘ ▶ thrown exception when called : java.lang.IllegalArgumentException - ✘ to be an instance of type : IllegalStateException (java.lang.IllegalStateException) - » ▶ message : - • not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String - • to contain : - • value : "no no no" - » but no match was found - ℹ️ Properties of the unexpected IllegalArgumentException +🚩️ ▶ thrown exception when called : java.lang.IllegalArgumentException + 🚫️ to be an instance of type : IllegalStateException (java.lang.IllegalStateException) + » ▶ message : + • not to equal: null but to be an instance of : String (kotlin.String) -- Class: java.lang.String + • to contain : + • value : "no no no" + » but no match was found + ℹ️ Properties of the unexpected IllegalArgumentException » message : "no no no..." » stacktrace : • readme.examples.MostExamples$ex-add-info-3$1.invoke(MostExamples.kt:117) @@ -2150,8 +2150,8 @@ expect(BigDecimal.TEN).toEqualIncludingScale(BigDecimal("10.0")) ```text I expected subject : 10 -✘ is equal (including scale) : 10.0 - 💡️ notice, if you used toEqualNumerically then the expectation would have been met. +🚩️ is equal (including scale) : 10.0 + 💡️ notice, if you used toEqualNumerically then the expectation would have been met. ``` @@ -2168,11 +2168,11 @@ expect(listOf(1)).get(0) {} ```text I expected subject : [1] (java.util.Collections.SingletonList <1234789>) -✘ ▶ get(0) : 1 - ✘ at least one expectation defined : false - ✘ to equal : true - 💡️ ❗❗ Assertion is deprecated, move to Proof, cannot show description : You forgot to create expectations in the expectationCreator-lambda - 💡️ ❗❗ Assertion is deprecated, move to Proof, cannot show description : Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()` +🚩️ ▶ get(0) : 1 + 🚩️ at least one expectation defined : false + 🚫️ to equal : true + 💡️ ❗❗ Assertion is deprecated, move to Proof, cannot show description : You forgot to create expectations in the expectationCreator-lambda + 💡️ ❗❗ Assertion is deprecated, move to Proof, cannot show description : Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()` ``` @@ -2232,7 +2232,7 @@ expect(12).toBeAMultipleOf(5) ```text I expected subject : 12 -✘ is multiple of : 5 +🚫️ is multiple of : 5 ``` @@ -2280,7 +2280,7 @@ expect(13).toBeEven() ```text I expected subject : 13 -✘ is : an even number +🚫️ is : an even number ``` @@ -2309,8 +2309,8 @@ expect(MyDomainModel(alpha1 = 1204)).toComplyValidation() ```text I expected subject : MyDomainModel(alpha1=1204) (readme.examples.ThirdPartyExamples.MyDomainModel <1234789>) -✘ to comply : validation - ℹ️ Properties of the unexpected IllegalStateException +🚩️ to comply : validation + ℹ️ Properties of the unexpected IllegalStateException » message : "threshold value for alpha1 exceeded, expected <= 1000, was 1204" » stacktrace : • readme.examples.ThirdPartyExamples.validateMaxThreshold(ThirdPartyExamples.kt:76) @@ -2416,9 +2416,9 @@ expect(Person("Susanne", "Whitley", 43, emptyList())) ```text I expected subject : Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>) -✘ ▶ children : [] (kotlin.collections.EmptyList <1234789>) - ✘ ▶ size : 0 - ✘ to equal : 2 +🚩️ ▶ children : [] (kotlin.collections.EmptyList <1234789>) + 🚩️ ▶ size : 0 + 🚫️ to equal : 2 ``` @@ -2452,11 +2452,11 @@ expect(Person("Susanne", "Whitley", 43, emptyList())) ```text I expected subject : Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>) -✘ ▶ children : [] (kotlin.collections.EmptyList <1234789>) - ✘ to have : a next element - » elements need all : - » ▶ age : - • to be greater than or equal to : 18 +🚩️ ▶ children : [] (kotlin.collections.EmptyList <1234789>) + 🚫️ to have : a next element + » elements need all : + » ▶ age : + • to be greater than or equal to : 18 ``` @@ -2498,9 +2498,9 @@ expect(Person("Susanne", "Whitley", 43, listOf(Person("Petra", "Whitley", 12, em ```text I expected subject : Person(firstName=Susanne, lastName=Whitley, age=43, children=[Person(firstName=Petra, lastName=Whitley, age=12, children=[])]) (readme.examples.Person <1234789>) -✘ ▶ children : [Person(firstName=Petra, lastName=Whitley, age=12, children=[])] (java.util.Collections.SingletonList <1234789>) - ✘ ▶ size : 1 - ✘ to equal : 2 +🚩️ ▶ children : [Person(firstName=Petra, lastName=Whitley, age=12, children=[])] (java.util.Collections.SingletonList <1234789>) + 🚩️ ▶ size : 1 + 🚫️ to equal : 2 ``` @@ -2680,7 +2680,7 @@ expect(10).toEqual(9) ```text I expected subject : 10 -✘ to equal : 9 +🚫️ to equal : 9 ``` diff --git a/apis/fluent/atrium-api-fluent/src/commonMain/kotlin/ch/tutteli/atrium/api/fluent/en_GB/documentationUtils.kt b/apis/fluent/atrium-api-fluent/src/commonMain/kotlin/ch/tutteli/atrium/api/fluent/en_GB/documentationUtils.kt index a7f9f9a570..2392ad9144 100644 --- a/apis/fluent/atrium-api-fluent/src/commonMain/kotlin/ch/tutteli/atrium/api/fluent/en_GB/documentationUtils.kt +++ b/apis/fluent/atrium-api-fluent/src/commonMain/kotlin/ch/tutteli/atrium/api/fluent/en_GB/documentationUtils.kt @@ -1,6 +1,3 @@ -//TODO 1.3.0 remove again and switch to core -//@file:Suppress("DEPRECATION") - package ch.tutteli.atrium.api.fluent.en_GB import ch.tutteli.atrium._coreAppend diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ArrayAsListExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ArrayAsListExpectationsSpec.kt index b443931197..e13ee859b8 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ArrayAsListExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ArrayAsListExpectationsSpec.kt @@ -26,7 +26,7 @@ object ArrayAsListExpectationsSpec : ch.tutteli.atrium.specs.integration.ArrayAs Expect::asList ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a2: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainNoToContainExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainNotToContainExpectationsSpec.kt similarity index 97% rename from apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainNoToContainExpectationsSpec.kt rename to apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainNotToContainExpectationsSpec.kt index a57d899860..edd2bc589a 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainNoToContainExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainNotToContainExpectationsSpec.kt @@ -40,7 +40,7 @@ class CharSequenceToContainNotToContainExpectationsSpec : Spek({ fun2>(Expect::notToContain) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainSpecBase.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainSpecBase.kt index 2171c74263..a3a37b0401 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainSpecBase.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceToContainSpecBase.kt @@ -34,7 +34,7 @@ abstract class CharSequenceToContainSpecBase { protected val values = CharSequenceContains.CheckerStep::values.name protected val elementsOf = CharSequenceContains.EntryPointStep::elementsOf.name - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CollectionExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CollectionExpectationsSpec.kt index e40564067a..a91f566d57 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CollectionExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CollectionExpectationsSpec.kt @@ -9,7 +9,7 @@ object CollectionExpectationsSpec : ch.tutteli.atrium.specs.integration.Collecti property, Int>(Expect>::size), fun1, Expect.() -> Unit>(Expect>::size) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a1b: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsBoundedReferenceSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsBoundedReferenceSpec.kt index 4a21f5c07e..71a9ff82c6 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsBoundedReferenceSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsBoundedReferenceSpec.kt @@ -106,7 +106,7 @@ class FeatureExpectationsBoundedReferenceSpec : ch.tutteli.atrium.specs.integrat val f5EmptyAssertionCreator: F = { feature({ f(it::return5, "a", 1, true, 1.2, 'b') }) {} } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect> = notImplemented() val a1b: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsClassReferenceSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsClassReferenceSpec.kt index 330276fb2e..8d8233d39d 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsClassReferenceSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FeatureExpectationsClassReferenceSpec.kt @@ -104,7 +104,7 @@ class FeatureExpectationsClassReferenceSpec : ch.tutteli.atrium.specs.integratio val f5EmptyAssertionCreator: F = { feature(TestData::return5, "a", 1, true, 1.2, 'b') {} } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect> = notImplemented() val a1b: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableExpectationsSpec.kt index 14e4001970..e8ffdbbd2d 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableExpectationsSpec.kt @@ -15,7 +15,7 @@ object IterableExpectationsSpec : ch.tutteli.atrium.specs.integration.IterableEx fun1, Expect.() -> Unit>(Expect>::last), ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a1b: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainNotEntriesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToContainEntriesExpectationsSpec.kt similarity index 98% rename from apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainNotEntriesExpectationsSpec.kt rename to apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToContainEntriesExpectationsSpec.kt index 767df9d240..fc15e34a52 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainNotEntriesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToContainEntriesExpectationsSpec.kt @@ -31,7 +31,7 @@ class IterableNotToContainEntriesExpectationsSpec : else expect.notToContain.entries(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt index a86132f3aa..b91a948cc4 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt @@ -10,7 +10,7 @@ object IterableNotToHaveElementsOrAllExpectationsSpec : ch.tutteli.atrium.specs. fun1(Expect>::notToHaveElementsOrAll).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt index 9d7a79b65c..9fbe7801af 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt @@ -10,7 +10,7 @@ class IterableNotToHaveElementsOrAnyExpectationsSpec : ch.tutteli.atrium.specs.i fun1(Expect>::notToHaveElementsOrAny).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt index 68f307a320..99fef60f69 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt @@ -10,7 +10,7 @@ class IterableNotToHaveElementsOrNoneExpectationsSpec : ch.tutteli.atrium.specs. fun1(Expect>::notToHaveElementsOrNone).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt index dd5bc37f8d..cdf09469fc 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt @@ -65,7 +65,7 @@ class IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec : Spek({ ): Expect> = expect.toContainElementsOf(sequenceOf(a, *aX).asIterable()) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt index 8db1736beb..391fabd85d 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt @@ -43,7 +43,7 @@ class IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec : Spek({ else expect.toContain.inAnyOrder.atLeast(1).entries(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt index 38eba44e3a..0431a4cd94 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt @@ -43,7 +43,7 @@ class IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec : Spek({ else expect.toContain.inAnyOrder.atLeast(1).values(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt index d4da2a9502..eac1d84e70 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt @@ -30,7 +30,7 @@ class IterableToContainInAnyOrderAtMostValuesExpectationsSpec : "use $exactly($times) instead of $atMost($times); $atMost($times) defines implicitly $atLeast($times) as well" } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt index 7751aa5331..dc02e25ebe 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt @@ -29,7 +29,7 @@ class IterableToContainInAnyOrderExactlyValuesExpectationsSpec : private fun getErrorMsgNotToContain(times: Int) = "use $notToContain instead of $exactly($times)" } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt index 213307ac2d..dd3daa0eda 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt @@ -27,7 +27,7 @@ class IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec : private fun getErrorMsgNotToContain(times: Int) = "use $notToContain instead of $notOrAtMost($times)" } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt index 122402e9a2..bef5b2e544 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt @@ -48,7 +48,7 @@ class IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec : Spek({ } else expect.toContain.inAnyOrder.only.elementsOf(listOf(a, *aX), report = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt index 62e46d52e6..3c519bbe4c 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt @@ -37,7 +37,7 @@ class IterableToContainInAnyOrderOnlyEntriesExpectationsSpec : } else expect.toContain.inAnyOrder.only.entries(a, *aX, report = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt index 326343cbff..b29264b99f 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt @@ -36,7 +36,7 @@ class IterableToContainInAnyOrderOnlyValuesExpectationsSpec : } else expect.toContain.inAnyOrder.only.values(a, *aX, report = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt index c7473cb66b..df470fa332 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt @@ -77,7 +77,7 @@ class IterableToContainInOrderOnlyElementsOfExpectationsSpec : Spek({ ): Expect> = expect.toContainExactlyElementsOf(sequenceOf(a, *aX).asIterable(), report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt index a4585dd144..da3d4df3d9 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt @@ -70,7 +70,7 @@ class IterableToContainInOrderOnlyEntriesExpectationsSpec : Spek({ ): Expect> = expect.toContainExactly(a, *aX, report = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt index 783fb8feb4..b242cab6c8 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt @@ -51,7 +51,7 @@ class IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec : } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt index 9baa514524..1c9fd5a3fe 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt @@ -86,7 +86,7 @@ class IterableToContainInOrderOnlyGroupedValuesExpectationsSpec : } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt index 86b3093c4b..683abae51d 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt @@ -55,7 +55,7 @@ class IterableToContainInOrderOnlyValuesExpectationsSpec : Spek({ } else expect.toContain.inOrder.only.values(a, *aX, report = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainNotValuesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainNotValuesExpectationsSpec.kt index 71b9eb87da..deecd629d3 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainNotValuesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToContainNotValuesExpectationsSpec.kt @@ -49,7 +49,7 @@ class IterableToContainNotValuesExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt index 9c9ab6964c..9be40e5492 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt @@ -10,7 +10,7 @@ object IterableToHaveElementsAndAllExpectationsSpec : ch.tutteli.atrium.specs.in fun1(Expect>::toHaveElementsAndAll).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt index ee3c70f7fb..71f6167f21 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt @@ -86,7 +86,7 @@ class IterableToHaveElementsAndAnyExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt index 7af174d0d5..fda0c489bd 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt @@ -35,7 +35,7 @@ class IterableToHaveElementsAndNoneExpectationsSpec : Spek({ expect.notToContain.entry(a) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ListExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ListExpectationsSpec.kt index 54ef879f9e..ac87064d54 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ListExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ListExpectationsSpec.kt @@ -56,7 +56,7 @@ object ListExpectationsSpec : Spek({ } }) - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a1b: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapAsEntriesExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapAsEntriesExpectationsSpec.kt index f28e445766..258e250bac 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapAsEntriesExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapAsEntriesExpectationsSpec.kt @@ -10,7 +10,7 @@ object MapAsEntriesExpectationsSpec : ch.tutteli.atrium.specs.integration.MapAsE fun1, Expect>>.() -> Unit>(Expect>::asEntries) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapEntryExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapEntryExpectationsSpec.kt index 6c76216b5f..d53bd18ecf 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapEntryExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapEntryExpectationsSpec.kt @@ -15,7 +15,7 @@ object MapEntryExpectationsSpec : ch.tutteli.atrium.specs.integration.MapEntryEx property, Int?>(Expect>::value).withNullableSuffix(), fun1, Expect.() -> Unit>(Expect>::value).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a2: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapExpectationsSpec.kt index 70c2257c39..05dfcef351 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapExpectationsSpec.kt @@ -42,7 +42,7 @@ class MapExpectationsSpec : ch.tutteli.atrium.specs.integration.MapExpectationsS } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt index ef68169652..fcfde74b2c 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt @@ -82,7 +82,7 @@ class MapToContainInAnyOrderEntriesOfExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt index 63b38c6940..8634ebb0f2 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt @@ -66,7 +66,7 @@ class MapToContainInAnyOrderKeyValueExpectationsSpec : Spek({ } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt index 6097e4d331..6d36143471 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt @@ -43,7 +43,7 @@ class MapToContainInAnyOrderKeyValuePairsExpectationsSpec : Spek({ else expect.toContain.inAnyOrder.entries(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt index 9672cb74f9..58161858ac 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt @@ -84,7 +84,7 @@ class MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec : Spek({ - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt index e6eecde4c9..a9e815a99c 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt @@ -68,7 +68,7 @@ class MapToContainInAnyOrderOnlyKeyValueExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt index 725b60abf0..b9e2757470 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt @@ -44,7 +44,7 @@ class MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt index 0d257bbcba..2fb2abf152 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt @@ -57,7 +57,7 @@ class MapToContainInOrderOnlyEntriesOfExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt index 329d5f5217..8717d66004 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt @@ -47,7 +47,7 @@ class MapToContainInOrderOnlyKeyValueExpectationsSpec : Spek({ } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt index e2890f6fa3..d9e4c4daf6 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt @@ -46,7 +46,7 @@ class MapToContainInOrderOnlyKeyValuePairsExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PairExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PairExpectationsSpec.kt index cb76c4567e..097aaae2ed 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PairExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PairExpectationsSpec.kt @@ -16,7 +16,7 @@ class PairExpectationsSpec : ch.tutteli.atrium.specs.integration.PairExpectation fun1, Expect.() -> Unit>(Expect>::second) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a2: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ThrowableExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ThrowableExpectationsSpec.kt index e29765b318..1bd2569fc7 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ThrowableExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ThrowableExpectationsSpec.kt @@ -25,7 +25,7 @@ class ThrowableExpectationsSpec : ch.tutteli.atrium.specs.integration.ThrowableE } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/IterableLikeToContainCheckerSamples.kt b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/IterableLikeToContainCheckerSamples.kt index d0b61b9099..fe2840fe76 100644 --- a/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/IterableLikeToContainCheckerSamples.kt +++ b/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/IterableLikeToContainCheckerSamples.kt @@ -10,6 +10,7 @@ class IterableLikeToContainCheckerSamples { @Test fun atLeast() { expect(listOf("A", "B", "C", "A", "B", "B")).toContain.inAnyOrder.atLeast(3).entry { + feature { f(String::plus, it, "1") }.toEqual("A1") toEqual("B") } diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateExpectationsSpec.kt index a1feed7cfe..0b109598c6 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateExpectationsSpec.kt @@ -28,7 +28,7 @@ class ChronoLocalDateExpectationsSpec : Spek({ fun1(Expect::toBeTheSamePointInTimeAs) ) - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val chronoLocalDate: ChronoLocalDate = notImplemented() var a1: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateTimeExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateTimeExpectationsSpec.kt index 6e48f13f6c..21040af408 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateTimeExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoLocalDateTimeExpectationsSpec.kt @@ -30,7 +30,7 @@ class ChronoLocalDateTimeExpectationsSpec : Spek({ fun1, String>(Expect>::toBeTheSamePointInTimeAs) ) - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val chronoLocalDateTime: ChronoLocalDateTime<*> = notImplemented() var a1: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoZonedDateTimeExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoZonedDateTimeExpectationsSpec.kt index c7f35ddd98..94914b8c24 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoZonedDateTimeExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ChronoZonedDateTimeExpectationsSpec.kt @@ -10,7 +10,8 @@ import java.time.chrono.ChronoLocalDate import java.time.chrono.ChronoZonedDateTime class ChronoZonedDateTimeExpectationsSpec : Spek({ - include(ChronoLocalDateTimeExpectationsSpec.ChronoLocalDateTimeSpec) + include(ChronoZonedDateTimeSpec) + include(ChronoZonedDateTimeAsStringSpec) }) { object ChronoZonedDateTimeSpec : ch.tutteli.atrium.specs.integration.ChronoZonedDateTimeExpectationsSpec( fun1, ChronoZonedDateTime<*>>(Expect>::toBeBefore), @@ -29,7 +30,7 @@ class ChronoZonedDateTimeExpectationsSpec : Spek({ fun1, String>(Expect>::toBeTheSamePointInTimeAs) ) - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val chronoZonedDateTime: ChronoZonedDateTime<*> = notImplemented() var a1: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateExpectationsSpec.kt index 4c99533875..23b659fee2 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateExpectationsSpec.kt @@ -8,7 +8,7 @@ import java.util.Date class DateAsLocalDateExpectationsSpec : DateAsLocalDateExpectationsSpec( Expect::asLocalDate ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var date: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateTimeExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateTimeExpectationsSpec.kt index b21e192ca5..e5add71d7a 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateTimeExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/DateAsLocalDateTimeExpectationsSpec.kt @@ -8,7 +8,7 @@ import java.util.Date class DateAsLocalDateTimeExpectationsSpec : DateAsLocalDateTimeExpectationsSpec( Expect::asLocalDateTime ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var date: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FileAsPathExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FileAsPathExpectationsSpec.kt index 71250c3171..252ad2cdd0 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FileAsPathExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/FileAsPathExpectationsSpec.kt @@ -7,7 +7,7 @@ import java.io.File class FileAsPathExpectationsSpec : ch.tutteli.atrium.specs.integration.FileAsPathExpectationsSpec( Expect::asPath ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateExpectationsSpec.kt index 36c7387804..d2c69162cc 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateExpectationsSpec.kt @@ -17,7 +17,7 @@ class LocalDateExpectationsSpec : ch.tutteli.atrium.specs.integration.LocalDateE property(Expect::dayOfWeek), fun1.() -> Unit>(Expect::dayOfWeek) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateTimeExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateTimeExpectationsSpec.kt index 343515c2ba..c0d3da8862 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateTimeExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/LocalDateTimeExpectationsSpec.kt @@ -17,7 +17,7 @@ class LocalDateTimeExpectationsSpec : ch.tutteli.atrium.specs.integration.LocalD property(Expect::dayOfWeek), fun1.() -> Unit>(Expect::dayOfWeek) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/OptionalExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/OptionalExpectationsSpec.kt index 6c6ab454f6..04897333cd 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/OptionalExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/OptionalExpectationsSpec.kt @@ -10,7 +10,7 @@ class OptionalExpectationsSpec : OptionalExpectationsSpec( feature0, Int>(Expect>::toBePresent), fun1, Expect.() -> Unit>(Expect>::toBePresent) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var o1: Expect> = notImplemented() var o1b: Expect> = notImplemented() diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PathExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PathExpectationsSpec.kt index e871550e6c..398e28fc4f 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PathExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/PathExpectationsSpec.kt @@ -49,7 +49,7 @@ class PathExpectationsSpec : ch.tutteli.atrium.specs.integration.PathExpectation expect.toHaveTheDirectoryEntries(entry) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() @@ -86,6 +86,7 @@ class PathExpectationsSpec : ch.tutteli.atrium.specs.integration.PathExpectation a1.resolve("test") a1.resolve("test") {} } + + class DummyPath(path: Path) : Path by path } -class DummyPath(path: Path) : Path by path diff --git a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ZonedDateTimeExpectationsSpec.kt b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ZonedDateTimeExpectationsSpec.kt index 8644ead3d9..54a12efc83 100644 --- a/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ZonedDateTimeExpectationsSpec.kt +++ b/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/ZonedDateTimeExpectationsSpec.kt @@ -17,7 +17,7 @@ class ZonedDateTimeExpectationsSpec : ch.tutteli.atrium.specs.integration.ZonedD property(Expect::dayOfWeek), fun1.() -> Unit>(Expect::dayOfWeek) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ArrayAsListExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ArrayAsListExpectationsSpec.kt index 821dffc0fb..e20f1abfe9 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ArrayAsListExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ArrayAsListExpectationsSpec.kt @@ -57,7 +57,7 @@ class ArrayAsListExpectationsSpec : ch.tutteli.atrium.specs.integration.ArrayAsL expect asList { assertionCreator() } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a2: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceExpectationsSpec.kt index a3ab283234..a5b0d27372 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceExpectationsSpec.kt @@ -21,7 +21,7 @@ class CharSequenceExpectationsSpec : ch.tutteli.atrium.specs.integration.CharSeq private fun notToBeBlank(expect: Expect) = expect notToBe blank } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainNotToContainExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainNotToContainExpectationsSpec.kt index 45d68494a6..841516f2bd 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainNotToContainExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainNotToContainExpectationsSpec.kt @@ -44,7 +44,7 @@ class CharSequenceToContainNotToContainExpectationsSpec : Spek({ else expect notToContain values(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainSpecBase.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainSpecBase.kt index d907c8dfa1..205684b6b9 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainSpecBase.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceToContainSpecBase.kt @@ -40,7 +40,7 @@ abstract class CharSequenceToContainSpecBase { protected val values = "the values" protected val elementsOf = CharSequenceContains.EntryPointStep::elementsOf.name - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CollectionExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CollectionExpectationsSpec.kt index fc335c1546..7f945f3878 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CollectionExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/CollectionExpectationsSpec.kt @@ -15,7 +15,7 @@ class CollectionExpectationsSpec : ch.tutteli.atrium.specs.integration.Collectio } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a1b: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceAlternativeSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceAlternativeSpec.kt index 04cbd9700b..386875fa56 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceAlternativeSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceAlternativeSpec.kt @@ -106,7 +106,7 @@ class FeatureExpectationsBoundedReferenceAlternativeSpec : ch.tutteli.atrium.spe { its feature (of({ f5(it::return5, "a", 1, true, 1.2, 'b') }) {}) } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect> = notImplemented() val a1b: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceSpec.kt index 6e1aa360b0..252b8b2a16 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsBoundedReferenceSpec.kt @@ -108,7 +108,7 @@ class FeatureExpectationsBoundedReferenceSpec : ch.tutteli.atrium.specs.integrat { it feature of({ f(it::return5, "a", 1, true, 1.2, 'b') }) {} } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect> = notImplemented() val a1b: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsClassReferenceSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsClassReferenceSpec.kt index b783fd4432..74651240ea 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsClassReferenceSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureExpectationsClassReferenceSpec.kt @@ -105,7 +105,7 @@ class FeatureExpectationsClassReferenceSpec : ch.tutteli.atrium.specs.integratio val f5EmptyAssertionCreator: F = { its feature of(TestData::return5, "a", 1, true, 1.2, 'b') {} } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect> = notImplemented() val a1b: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableExpectationsSpec.kt index 95b0d6ca7d..ca8defaf05 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableExpectationsSpec.kt @@ -44,7 +44,7 @@ class IterableExpectationsSpec : ch.tutteli.atrium.specs.integration.IterableExp private fun lastFeature(expect: Expect>) = expect last o } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a1b: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt index a14cdeaeca..eccf206d3f 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAllExpectationsSpec.kt @@ -10,7 +10,7 @@ class IterableNotToHaveElementsOrAllExpectationsSpec : ch.tutteli.atrium.specs.i fun1(Expect>::notToHaveElementsOrAll).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt index ae8fb3e961..96c8d1c6e9 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrAnyExpectationsSpec.kt @@ -10,7 +10,7 @@ class IterableNotToHaveElementsOrAnyExpectationsSpec : ch.tutteli.atrium.specs.i fun1(Expect>::notToHaveElementsOrAny).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt index 669e6c3f75..22629671c7 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableNotToHaveElementsOrNoneExpectationsSpec.kt @@ -11,7 +11,7 @@ class IterableNotToHaveElementsOrNoneExpectationsSpec : fun1(Expect>::notToHaveElementsOrNone).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt index 72f764e7d5..6fe2c613a4 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec.kt @@ -78,7 +78,7 @@ class IterableToContainInAnyOrderAtLeast1ElementsOfExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt index 76d79670fd..5df58323a8 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec.kt @@ -73,7 +73,7 @@ class IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt index 21e46931ee..88abf18792 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec.kt @@ -73,7 +73,7 @@ class IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec : Spek({ else expect toContain values(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt index 3b477ce7fb..d09c5986d5 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderAtMostValuesExpectationsSpec.kt @@ -31,7 +31,7 @@ class IterableToContainInAnyOrderAtMostValuesExpectationsSpec : "use `$exactly $times` instead of `$atMost $times`; `$atMost $times` defines implicitly `$atLeast $times` as well" } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt index 688302a059..4264b21e13 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderExactlyValuesExpectationsSpec.kt @@ -30,7 +30,7 @@ class IterableToContainInAnyOrderExactlyValuesExpectationsSpec : } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt index 0f8719e99a..950ddf37af 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec.kt @@ -29,7 +29,7 @@ class IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec : private fun getErrorMsgNotToContain(times: Int) = "use `$notToContain` instead of `$notOrAtMost $times`" } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt index e2920ab9bd..638adfc9ec 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec.kt @@ -61,7 +61,7 @@ class IterableToContainInAnyOrderOnlyElementsOfExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt index 82b0d6a215..5d22f3500b 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyEntriesExpectationsSpec.kt @@ -42,7 +42,7 @@ class IterableToContainInAnyOrderOnlyEntriesExpectationsSpec : } else expect toContain o inAny order but only the entries(a, *aX, reportOptionsInAnyOrderOnly = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt index 237d8b40ee..8f7f3c6e58 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInAnyOrderOnlyValuesExpectationsSpec.kt @@ -42,7 +42,7 @@ class IterableToContainInAnyOrderOnlyValuesExpectationsSpec : } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt index 2fdd8ecfe4..2c1b54faed 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyElementsOfExpectationsSpec.kt @@ -97,7 +97,7 @@ class IterableToContainInOrderOnlyElementsOfExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt index 13281a4bab..29b3a8d19e 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyEntriesExpectationsSpec.kt @@ -91,7 +91,7 @@ class IterableToContainInOrderOnlyEntriesExpectationsSpec : Spek({ } else expect toContainExactly entries(a, *aX, reportOptionsInOrderOnly = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt index a4fc60b72e..e2bb77e2e9 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec.kt @@ -55,7 +55,7 @@ class IterableToContainInOrderOnlyGroupedEntriesExpectationsSpec : } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt index 6bbfd1a132..ab18b52c6c 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyGroupedValuesExpectationsSpec.kt @@ -88,7 +88,7 @@ class IterableToContainInOrderOnlyGroupedValuesExpectationsSpec : } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt index 9b6b8ff3e1..252da5b556 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToContainInOrderOnlyValuesExpectationsSpec.kt @@ -88,7 +88,7 @@ class IterableToContainInOrderOnlyValuesExpectationsSpec : Spek({ } else expect toContainExactly values(a, *aX, reportOptionsInOrderOnly = report) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt index 7be83ef9bb..77579a5b06 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAllExpectationsSpec.kt @@ -10,7 +10,7 @@ class IterableToHaveElementsAndAllExpectationsSpec : ch.tutteli.atrium.specs.int fun1(Expect>::toHaveElementsAndAll).withNullableSuffix() ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt index db6be15f8d..b92855ab7a 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndAnyExpectationsSpec.kt @@ -87,7 +87,7 @@ class IterableToHaveElementsAndAnyExpectationsSpec : Spek({ ) = expect._logic.changeSubject.unreported { it.asSequence() } asIterable { it toContain a } asIterable o } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt index c225dff3f0..34a99adfaf 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableToHaveElementsAndNoneExpectationsSpec.kt @@ -35,7 +35,7 @@ class IterableToHaveElementsAndNoneExpectationsSpec : Spek({ expect notToContain o entry a } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var list: Expect> = notImplemented() var nList: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ListExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ListExpectationsSpec.kt index b996a5e88c..264c54a68f 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ListExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ListExpectationsSpec.kt @@ -73,7 +73,7 @@ class ListExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a1b: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapAsEntriesExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapAsEntriesExpectationsSpec.kt index a7cd4284aa..87a1ffc768 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapAsEntriesExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapAsEntriesExpectationsSpec.kt @@ -18,7 +18,7 @@ class MapAsEntriesExpectationsSpec : ch.tutteli.atrium.specs.integration.MapAsEn fun asEntriesFeature(expect: Expect>) = expect asEntries o } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapEntryExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapEntryExpectationsSpec.kt index ce66eb5d77..c9ed4eb0c3 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapEntryExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapEntryExpectationsSpec.kt @@ -24,7 +24,7 @@ class MapEntryExpectationsSpec : ch.tutteli.atrium.specs.integration.MapEntryExp expect toEqualKeyValue (key to value) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a2: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapExpectationsSpec.kt index 829023c7db..d82c7b3d58 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapExpectationsSpec.kt @@ -54,7 +54,7 @@ class MapExpectationsSpec : ch.tutteli.atrium.specs.integration.MapExpectationsS } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt index e7f527168f..b8b844768c 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderEntriesOfExpectationsSpec.kt @@ -79,7 +79,7 @@ class MapToContainInAnyOrderEntriesOfExpectationsSpec : Spek({ expect toContainEntriesOf arrayOf(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt index 523e75683b..b675b674e9 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValueExpectationsSpec.kt @@ -70,7 +70,7 @@ class MapToContainInAnyOrderKeyValueExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt index 6fa5cb27b6..52631ca563 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderKeyValuePairsExpectationsSpec.kt @@ -60,7 +60,7 @@ class MapToContainInAnyOrderKeyValuePairsExpectationsSpec : Spek({ else expect toContain pairs(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt index 0ece5e63fc..0f6c0ed919 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec.kt @@ -80,7 +80,7 @@ class MapToContainInAnyOrderOnlyEntriesOfExpectationsSpec : Spek({ expect toContainOnlyEntriesOf arrayOf(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt index bf5c6d2270..eea731432c 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValueExpectationsSpec.kt @@ -66,7 +66,7 @@ class MapToContainInAnyOrderOnlyKeyValueExpectationsSpec : Spek({ } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt index 9c11665b73..ec6526ba7a 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec.kt @@ -61,7 +61,7 @@ class MapToContainInAnyOrderOnlyKeyValuePairsExpectationsSpec : Spek({ else expect toContainOnly pairs(a, *aX) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt index 9427a00c63..109b0c024f 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyEntriesOfExpectationsSpec.kt @@ -60,7 +60,7 @@ class MapToContainInOrderOnlyEntriesOfExpectationsSpec : Spek({ ) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt index 7fad08f89c..d1560c3d2b 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValueExpectationsSpec.kt @@ -54,7 +54,7 @@ class MapToContainInOrderOnlyKeyValueExpectationsSpec : Spek({ } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt index 4f4024f0a8..fd571e4b44 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/MapToContainInOrderOnlyKeyValuePairsExpectationsSpec.kt @@ -45,7 +45,7 @@ class MapToContainInOrderOnlyKeyValuePairsExpectationsSpec : Spek({ } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var map: Expect> = notImplemented() var subMap: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PairExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PairExpectationsSpec.kt index a5c6fd062d..7ff759b132 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PairExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PairExpectationsSpec.kt @@ -16,7 +16,7 @@ class PairExpectationsSpec : ch.tutteli.atrium.specs.integration.PairExpectation fun1, Expect.() -> Unit>(Expect>::second) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect> = notImplemented() var a2: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ThrowableExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ThrowableExpectationsSpec.kt index 5a346fd2b3..4ac025fa26 100644 --- a/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ThrowableExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ThrowableExpectationsSpec.kt @@ -35,7 +35,7 @@ class ThrowableExpectationsSpec : ch.tutteli.atrium.specs.integration.ThrowableE ) = expect.cause(assertionCreator) } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateExpectationsSpec.kt index c2ad0a6f28..4b7fc09c91 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateExpectationsSpec.kt @@ -28,7 +28,7 @@ class ChronoLocalDateExpectationsSpec : Spek({ fun1(Expect::toBeTheSamePointInTimeAs) ) - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val chronoLocalDate: ChronoLocalDate = notImplemented() var a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateTimeExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateTimeExpectationsSpec.kt index 45fd1f7532..4ef9e6f813 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateTimeExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoLocalDateTimeExpectationsSpec.kt @@ -30,7 +30,7 @@ class ChronoLocalDateTimeExpectationsSpec : Spek({ fun1, String>(Expect>::toBeTheSamePointInTimeAs) ) - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val chronoLocalDateTime: ChronoLocalDateTime<*> = notImplemented() var a1: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoZonedDateTimeExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoZonedDateTimeExpectationsSpec.kt index fffee23ccb..41e47431ea 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoZonedDateTimeExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ChronoZonedDateTimeExpectationsSpec.kt @@ -31,7 +31,7 @@ class ChronoZonedDateTimeExpectationsSpec : Spek({ fun1, String>(Expect>::toBeTheSamePointInTimeAs) ) - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val chronoZonedDateTime: ChronoZonedDateTime<*> = notImplemented() var a1: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateExpectionsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateExpectionsSpec.kt index f87ed9376b..8f9ef82e9b 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateExpectionsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateExpectionsSpec.kt @@ -8,7 +8,7 @@ import java.util.Date class DateAsLocalDateExpectionsSpec : DateAsLocalDateExpectationsSpec( Expect::asLocalDate ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var date: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateTimeExpectionsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateTimeExpectionsSpec.kt index 6a15e3b543..37ca765bf3 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateTimeExpectionsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/DateAsLocalDateTimeExpectionsSpec.kt @@ -8,7 +8,7 @@ import java.util.Date class DateAsLocalDateTimeExpectationsSpec : DateAsLocalDateTimeExpectationsSpec( Expect::asLocalDateTime ){ - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var date: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FileAsPathExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FileAsPathExpectationsSpec.kt index ff7fc30124..4c0612040f 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FileAsPathExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FileAsPathExpectationsSpec.kt @@ -8,7 +8,7 @@ class FileAsPathExpectationsSpec : ch.tutteli.atrium.specs.integration.FileAsPat Expect::asPath ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateExpectationsSpec.kt index f0bd8c966d..1b0d85e9ff 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateExpectationsSpec.kt @@ -18,7 +18,7 @@ class LocalDateExpectationsSpec : ch.tutteli.atrium.specs.integration.LocalDateE fun1.() -> Unit>(Expect::dayOfWeek) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateTimeExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateTimeExpectationsSpec.kt index e4fe17ff68..a34f730db1 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateTimeExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/LocalDateTimeExpectationsSpec.kt @@ -18,7 +18,7 @@ class LocalDateTimeExpectationsSpec : ch.tutteli.atrium.specs.integration.LocalD fun1.() -> Unit>(Expect::dayOfWeek) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/OptionalExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/OptionalExpectationsSpec.kt index c720632f4b..874a653e8c 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/OptionalExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/OptionalExpectationsSpec.kt @@ -22,7 +22,7 @@ class OptionalExpectationsSpec : OptionalExpectationsSpec( private fun toBePresentFeature(expect: Expect>) = expect toBe present } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var o1: Expect> = notImplemented() var o1b: Expect> = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PathExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PathExpectationsSpec.kt index 15265d6fc9..d06b6388f1 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PathExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/PathExpectationsSpec.kt @@ -84,7 +84,7 @@ class PathExpectationsSpec : ch.tutteli.atrium.specs.integration.PathExpectation ): Expect = expect resolve path(other) { assertionCreator() } } - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { val a1: Expect = notImplemented() diff --git a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ZonedDateTimeExpectationsSpec.kt b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ZonedDateTimeExpectationsSpec.kt index bdfc2d0554..7b5115f77b 100644 --- a/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ZonedDateTimeExpectationsSpec.kt +++ b/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/ZonedDateTimeExpectationsSpec.kt @@ -18,7 +18,7 @@ class ZonedDateTimeExpectationsSpec : ch.tutteli.atrium.specs.integration.ZonedD fun1.() -> Unit>(Expect::dayOfWeek) ) { - @Suppress("unused", "UNUSED_VALUE") + @Suppress("unused") private fun ambiguityTest() { var a1: Expect = notImplemented() diff --git a/atrium-core/api/main/atrium-core.api b/atrium-core/api/main/atrium-core.api index 2199ebc78b..326b5c8cbf 100644 --- a/atrium-core/api/main/atrium-core.api +++ b/atrium-core/api/main/atrium-core.api @@ -1090,7 +1090,7 @@ public final class ch/tutteli/atrium/creating/proofs/builders/ReportableGroupBui } public final class ch/tutteli/atrium/creating/proofs/builders/RowBuilder : ch/tutteli/atrium/creating/proofs/builders/impl/BaseBuilder { - public fun (Lch/tutteli/atrium/creating/ProofContainer;Lch/tutteli/atrium/reporting/reportables/Icon;)V + public fun (Lch/tutteli/atrium/creating/ProofContainer;Lch/tutteli/atrium/reporting/reportables/Icon;Z)V public synthetic fun build (Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun column (Lch/tutteli/atrium/reporting/reportables/InlineElement;Lch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/reportables/Column; public static synthetic fun column$default (Lch/tutteli/atrium/creating/proofs/builders/RowBuilder;Lch/tutteli/atrium/reporting/reportables/InlineElement;Lch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Column; @@ -1126,8 +1126,8 @@ public abstract class ch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupB public final fun proofExplanation (Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun reportableGroup (Lch/tutteli/atrium/reporting/reportables/InlineElement;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun representationOnlyProof (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/creating/proofs/Proof; - public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; - public static synthetic fun row$default (Lch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder;Lch/tutteli/atrium/reporting/reportables/Icon;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Reportable; + public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;ZLkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; + public static synthetic fun row$default (Lch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder;Lch/tutteli/atrium/reporting/reportables/Icon;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun simpleProof (Lch/tutteli/atrium/reporting/reportables/InlineElement;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/creating/proofs/Proof; public final fun text (Ljava/lang/String;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun usageHintGroup (Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; @@ -1538,7 +1538,7 @@ public final class ch/tutteli/atrium/reporting/AssertionPairFormatter$DefaultImp public static fun format (Lch/tutteli/atrium/reporting/AssertionPairFormatter;Lch/tutteli/atrium/reporting/AssertionFormatterParameterObject;Lch/tutteli/atrium/reporting/translating/Translatable;Ljava/lang/Object;)V } -public final class ch/tutteli/atrium/reporting/AtriumError : java/lang/AssertionError { +public final class ch/tutteli/atrium/reporting/AtriumError : org/opentest4j/AssertionFailedError { public static final field Companion Lch/tutteli/atrium/reporting/AtriumError$Companion; public final fun getCausingProof ()Lch/tutteli/atrium/creating/proofs/Proof; public fun getLocalizedMessage ()Ljava/lang/String; @@ -1559,6 +1559,11 @@ public abstract interface class ch/tutteli/atrium/reporting/AtriumErrorAdjusterC public abstract fun adjustOtherThanStacks (Ljava/lang/Throwable;)V } +public final class ch/tutteli/atrium/reporting/AtriumErrorJvmKt { + public static final fun extractActual (Lch/tutteli/atrium/creating/proofs/Proof;)Ljava/lang/Object; + public static final fun extractExpected (Lch/tutteli/atrium/creating/proofs/Proof;)Ljava/lang/Object; +} + public final class ch/tutteli/atrium/reporting/ConstantsKt { public static final field BUG_REPORT_URL Ljava/lang/String; public static final field SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG Ljava/lang/String; @@ -1768,6 +1773,7 @@ public final class ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderCo public final class ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControllerKt { public static final fun determineChildControlObject (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Lch/tutteli/atrium/reporting/reportables/Reportable;Lch/tutteli/atrium/reporting/reportables/Icon;I)Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject; public static synthetic fun determineChildControlObject$default (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Lch/tutteli/atrium/reporting/reportables/Reportable;Lch/tutteli/atrium/reporting/reportables/Icon;IILjava/lang/Object;)Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject; + public static final fun hasAtLeastOneLeaveProof (Lch/tutteli/atrium/reporting/reportables/ReportableGroup;)Z public static final fun transformGroup (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController;Lch/tutteli/atrium/reporting/reportables/ReportableGroup;Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/functions/Function1;)Ljava/util/List; public static final fun transformGroup (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController;Lch/tutteli/atrium/reporting/reportables/ReportableGroupWithDescription;Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/functions/Function1;)Ljava/util/List; public static final fun transformGroup (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController;Lch/tutteli/atrium/reporting/reportables/ReportableWithDesignation;Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Ljava/util/List;Ljava/util/List;I)Ljava/util/List; @@ -1854,6 +1860,7 @@ public final class ch/tutteli/atrium/reporting/reportables/Icon : java/lang/Enum public static final field BULB Lch/tutteli/atrium/reporting/reportables/Icon; public static final field DEBUG_INFO Lch/tutteli/atrium/reporting/reportables/Icon; public static final field EMPTY_STRING Lch/tutteli/atrium/reporting/reportables/Icon; + public static final field FAILING_GROUP Lch/tutteli/atrium/reporting/reportables/Icon; public static final field FAILURE Lch/tutteli/atrium/reporting/reportables/Icon; public static final field FEATURE Lch/tutteli/atrium/reporting/reportables/Icon; public static final field FEATURE_BULLET_POINT Lch/tutteli/atrium/reporting/reportables/Icon; @@ -1903,7 +1910,7 @@ public final class ch/tutteli/atrium/reporting/reportables/Reportable$Companion public final fun inlineGroupOrSingleElement (Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/InlineElement; public final fun proofExplanation (Lch/tutteli/atrium/creating/proofs/Proof;)Lch/tutteli/atrium/reporting/reportables/ProofExplanation; public final fun representation (Ljava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Representation; - public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/Row; + public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;ZLjava/util/List;)Lch/tutteli/atrium/reporting/reportables/Row; public final fun usageHintGroup (Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/UsageHintGroup; } @@ -1934,6 +1941,7 @@ public abstract interface class ch/tutteli/atrium/reporting/reportables/Represen public abstract interface class ch/tutteli/atrium/reporting/reportables/Row : ch/tutteli/atrium/reporting/reportables/Reportable { public abstract fun getColumns ()Ljava/util/List; public abstract fun getIcon ()Lch/tutteli/atrium/reporting/reportables/Icon; + public abstract fun getIncludingBorder ()Z } public abstract interface class ch/tutteli/atrium/reporting/reportables/TextElement : ch/tutteli/atrium/reporting/reportables/InlineElement { @@ -1959,7 +1967,9 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { public static final field NOT_TO_BE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; + public static final field NOT_TO_HAVE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; public static final field TO_BE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; + public static final field TO_HAVE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; public fun getDefault ()Ljava/lang/String; public fun getString ()Ljava/lang/String; public static fun valueOf (Ljava/lang/String;)Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; @@ -1982,9 +1992,9 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public static final field AT_LEAST Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field AT_MOST Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field BLANK Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; + public static final field Companion Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof$Companion; public static final field EMPTY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field EXACTLY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; - public static final field IGNORING_CASE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field NOT_FOUND Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field NOT_TO_CONTAIN Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field NOT_TO_END_WITH Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; @@ -2003,6 +2013,19 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; } +public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof$Companion { + public final fun getIGNORING_CASE (Lch/tutteli/atrium/reporting/reportables/Description;)Lch/tutteli/atrium/reporting/reportables/Description; +} + +public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { + public static final field EMPTY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; + public static final field SIZE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; + public fun getDefault ()Ljava/lang/String; + public fun getString ()Ljava/lang/String; + public static fun valueOf (Ljava/lang/String;)Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; + public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; +} + public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { public static final field NOT_TO_BE_GREATER_THAN Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof; public static final field NOT_TO_BE_LESS_THAN Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof; @@ -2017,6 +2040,23 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof; } +public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { + public static final field DAY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field DAY_OF_WEEK Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field MONTH Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_AFTER Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_AFTER_OR_THE_SAME_POINT_IN_TIME_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_BEFORE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_BEFORE_OR_THE_SAME_POINT_IN_TIME_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_THE_SAME_DAY_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_THE_SAME_POINT_IN_TIME_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field YEAR Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public fun getDefault ()Ljava/lang/String; + public fun getString ()Ljava/lang/String; + public static fun valueOf (Ljava/lang/String;)Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; +} + public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDocumentationUtil : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { public static final field BECAUSE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDocumentationUtil; public fun getDefault ()Ljava/lang/String; @@ -2064,6 +2104,12 @@ public final class ch/tutteli/atrium/reporting/reportables/impl/DefaultRepresent public fun getRepresentation ()Ljava/lang/Object; } +public final class ch/tutteli/atrium/reporting/reportables/impl/SuffixedDescription : ch/tutteli/atrium/reporting/reportables/Description { + public fun (Lch/tutteli/atrium/reporting/reportables/Description;Ljava/lang/String;)V + public fun getDefault ()Ljava/lang/String; + public fun getString ()Ljava/lang/String; +} + public abstract interface class ch/tutteli/atrium/reporting/text/BulletPointProvider { public abstract fun getBulletPoints ()Ljava/util/Map; } @@ -2131,7 +2177,7 @@ public final class ch/tutteli/atrium/reporting/text/impl/DefaultTextMethodCallFo public final class ch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter : ch/tutteli/atrium/reporting/text/TextObjFormatter { public static final field Companion Lch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter$Companion; public static final field LIMIT I - public fun (Lch/tutteli/atrium/reporting/ObjectFormatter;)V + public fun (Lch/tutteli/atrium/reporting/ObjectFormatter;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;)V public fun format (Ljava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } @@ -2242,6 +2288,21 @@ public final class ch/tutteli/atrium/reporting/text/impl/TextSummaryAssertionGro public fun (Ljava/util/Map;Lch/tutteli/atrium/reporting/AssertionFormatterController;Lch/tutteli/atrium/reporting/AssertionPairFormatter;)V } +public abstract interface class ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator { + public abstract fun calculate (Ljava/lang/String;)I +} + +public abstract interface class ch/tutteli/atrium/reporting/theming/text/NotYetStyledString { + public static final field Companion Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString$Companion; + public abstract fun getMonospaceLength ()I + public abstract fun getUnstyled ()Ljava/lang/String; +} + +public final class ch/tutteli/atrium/reporting/theming/text/NotYetStyledString$Companion { + public final fun create (Ljava/lang/String;I)Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString; + public static synthetic fun create$default (Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString$Companion;Ljava/lang/String;IILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString; +} + public final class ch/tutteli/atrium/reporting/theming/text/Style : java/lang/Enum { public static final field DEBUG_INFO Lch/tutteli/atrium/reporting/theming/text/Style; public static final field FAILURE Lch/tutteli/atrium/reporting/theming/text/Style; @@ -2256,27 +2317,37 @@ public final class ch/tutteli/atrium/reporting/theming/text/Style : java/lang/En public abstract interface class ch/tutteli/atrium/reporting/theming/text/StyledString { public static final field Companion Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion; - public abstract fun appendUnstyled (Ljava/lang/String;)Lch/tutteli/atrium/reporting/theming/text/StyledString; public abstract fun getHorizontalAlignment ()Lch/tutteli/atrium/reporting/HorizontalAlignment; + public abstract fun getMaxLineMonospaceLength ()I public abstract fun getMaybeStyled ()Lch/tutteli/atrium/core/Option; + public abstract fun getMonospaceLength ()I public abstract fun getNoLineBreak ()Z + public abstract fun getString ()Ljava/lang/String; public abstract fun getUnstyled ()Ljava/lang/String; - public abstract fun result ()Ljava/lang/String; + public abstract fun padString (I)Ljava/lang/String; public abstract fun withHorizontalAlignment (Lch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; public abstract fun withoutLineBreaks ()Lch/tutteli/atrium/reporting/theming/text/StyledString; } public final class ch/tutteli/atrium/reporting/theming/text/StyledString$Companion { + public final fun create (Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun create$default (Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public final fun createWithPredefinedMonospaceLength (Ljava/lang/String;Lch/tutteli/atrium/core/Option;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun createWithPredefinedMonospaceLength$default (Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion;Ljava/lang/String;Lch/tutteli/atrium/core/Option;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; public final fun getCOLON_SEPARATOR ()Lch/tutteli/atrium/reporting/theming/text/StyledString; public final fun getEMPTY_STRING ()Lch/tutteli/atrium/reporting/theming/text/StyledString; - public final fun invoke (Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun invoke$default (Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; +} + +public final class ch/tutteli/atrium/reporting/theming/text/StyledString$DefaultImpls { + public static fun padString (Lch/tutteli/atrium/reporting/theming/text/StyledString;I)Ljava/lang/String; } public final class ch/tutteli/atrium/reporting/theming/text/StyledStringKt { - public static final fun noStyle (Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun noStyle$default (Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static final fun pad (Lch/tutteli/atrium/reporting/theming/text/StyledString;I)Ljava/lang/String; + public static final fun noStyle (Ljava/lang/String;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun noStyle (Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun noStyle$default (Ljava/lang/String;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun noStyle$default (Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun padMonospace (Lch/tutteli/atrium/reporting/theming/text/StyledString;I)Ljava/lang/String; public static final fun replaceWrap (Lch/tutteli/atrium/reporting/theming/text/StyledString;Ljava/lang/String;)Ljava/lang/String; } @@ -2285,22 +2356,24 @@ public abstract interface class ch/tutteli/atrium/reporting/theming/text/TextIco } public abstract interface class ch/tutteli/atrium/reporting/theming/text/TextStyler { - public abstract fun style (Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public abstract fun style (Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public abstract fun styleWithPredefinedMonospaceLength (Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } public final class ch/tutteli/atrium/reporting/theming/text/TextStyler$DefaultImpls { - public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun styleWithPredefinedMonospaceLength$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } public final class ch/tutteli/atrium/reporting/theming/text/TextStylerKt { - public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/core/Option;Z)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } public abstract interface class ch/tutteli/atrium/reporting/theming/text/TextThemeProvider { - public abstract fun getSupportsAnsi ()Z + public abstract fun getSupportsAnsiColours ()Z public abstract fun render (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; } @@ -2313,6 +2386,29 @@ public final class ch/tutteli/atrium/reporting/theming/text/impl/MarkdownTextIco public fun style (Lch/tutteli/atrium/reporting/reportables/Icon;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } +public abstract class ch/tutteli/atrium/reporting/theming/text/impl/MonospaceCalculatorBasedStyledString : ch/tutteli/atrium/reporting/theming/text/StyledString { + public fun (Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)V + public fun getHorizontalAlignment ()Lch/tutteli/atrium/reporting/HorizontalAlignment; + public fun getMaybeStyled ()Lch/tutteli/atrium/core/Option; + public fun getNoLineBreak ()Z + public final fun getString ()Ljava/lang/String; + public fun getUnstyled ()Ljava/lang/String; + public fun padString (I)Ljava/lang/String; + public fun toString ()Ljava/lang/String; + public final fun withHorizontalAlignment (Lch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public final fun withoutLineBreaks ()Lch/tutteli/atrium/reporting/theming/text/StyledString; +} + +public final class ch/tutteli/atrium/reporting/theming/text/impl/MonospaceLengthPrecalculated : ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator { + public fun ()V + public fun calculate (Ljava/lang/String;)I +} + +public final class ch/tutteli/atrium/reporting/theming/text/impl/StringLengthMonospaceLengthCalculator : ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator { + public static final field INSTANCE Lch/tutteli/atrium/reporting/theming/text/impl/StringLengthMonospaceLengthCalculator; + public fun calculate (Ljava/lang/String;)I +} + public abstract class ch/tutteli/atrium/reporting/translating/ArgumentsSupportingTranslator : ch/tutteli/atrium/reporting/translating/Translator { public fun (Lch/tutteli/atrium/reporting/translating/Locale;Ljava/util/List;)V protected final fun getFallbackLocales ()Ljava/util/List; diff --git a/atrium-core/api/using-kotlin-1.9-or-newer/atrium-core.api b/atrium-core/api/using-kotlin-1.9-or-newer/atrium-core.api index 932ea5e1b2..f9c917591e 100644 --- a/atrium-core/api/using-kotlin-1.9-or-newer/atrium-core.api +++ b/atrium-core/api/using-kotlin-1.9-or-newer/atrium-core.api @@ -1091,7 +1091,7 @@ public final class ch/tutteli/atrium/creating/proofs/builders/ReportableGroupBui } public final class ch/tutteli/atrium/creating/proofs/builders/RowBuilder : ch/tutteli/atrium/creating/proofs/builders/impl/BaseBuilder { - public fun (Lch/tutteli/atrium/creating/ProofContainer;Lch/tutteli/atrium/reporting/reportables/Icon;)V + public fun (Lch/tutteli/atrium/creating/ProofContainer;Lch/tutteli/atrium/reporting/reportables/Icon;Z)V public synthetic fun build (Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun column (Lch/tutteli/atrium/reporting/reportables/InlineElement;Lch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/reportables/Column; public static synthetic fun column$default (Lch/tutteli/atrium/creating/proofs/builders/RowBuilder;Lch/tutteli/atrium/reporting/reportables/InlineElement;Lch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Column; @@ -1127,8 +1127,8 @@ public abstract class ch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupB public final fun proofExplanation (Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun reportableGroup (Lch/tutteli/atrium/reporting/reportables/InlineElement;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun representationOnlyProof (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/creating/proofs/Proof; - public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; - public static synthetic fun row$default (Lch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder;Lch/tutteli/atrium/reporting/reportables/Icon;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Reportable; + public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;ZLkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; + public static synthetic fun row$default (Lch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder;Lch/tutteli/atrium/reporting/reportables/Icon;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun simpleProof (Lch/tutteli/atrium/reporting/reportables/InlineElement;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/creating/proofs/Proof; public final fun text (Ljava/lang/String;)Lch/tutteli/atrium/reporting/reportables/Reportable; public final fun usageHintGroup (Lkotlin/jvm/functions/Function1;)Lch/tutteli/atrium/reporting/reportables/Reportable; @@ -1539,7 +1539,7 @@ public final class ch/tutteli/atrium/reporting/AssertionPairFormatter$DefaultImp public static fun format (Lch/tutteli/atrium/reporting/AssertionPairFormatter;Lch/tutteli/atrium/reporting/AssertionFormatterParameterObject;Lch/tutteli/atrium/reporting/translating/Translatable;Ljava/lang/Object;)V } -public final class ch/tutteli/atrium/reporting/AtriumError : java/lang/AssertionError { +public final class ch/tutteli/atrium/reporting/AtriumError : org/opentest4j/AssertionFailedError { public static final field Companion Lch/tutteli/atrium/reporting/AtriumError$Companion; public final fun getCausingProof ()Lch/tutteli/atrium/creating/proofs/Proof; public fun getLocalizedMessage ()Ljava/lang/String; @@ -1560,6 +1560,11 @@ public abstract interface class ch/tutteli/atrium/reporting/AtriumErrorAdjusterC public abstract fun adjustOtherThanStacks (Ljava/lang/Throwable;)V } +public final class ch/tutteli/atrium/reporting/AtriumErrorJvmKt { + public static final fun extractActual (Lch/tutteli/atrium/creating/proofs/Proof;)Ljava/lang/Object; + public static final fun extractExpected (Lch/tutteli/atrium/creating/proofs/Proof;)Ljava/lang/Object; +} + public final class ch/tutteli/atrium/reporting/ConstantsKt { public static final field BUG_REPORT_URL Ljava/lang/String; public static final field SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG Ljava/lang/String; @@ -1770,6 +1775,7 @@ public final class ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderCo public final class ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControllerKt { public static final fun determineChildControlObject (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Lch/tutteli/atrium/reporting/reportables/Reportable;Lch/tutteli/atrium/reporting/reportables/Icon;I)Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject; public static synthetic fun determineChildControlObject$default (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Lch/tutteli/atrium/reporting/reportables/Reportable;Lch/tutteli/atrium/reporting/reportables/Icon;IILjava/lang/Object;)Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject; + public static final fun hasAtLeastOneLeaveProof (Lch/tutteli/atrium/reporting/reportables/ReportableGroup;)Z public static final fun transformGroup (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController;Lch/tutteli/atrium/reporting/reportables/ReportableGroup;Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/functions/Function1;)Ljava/util/List; public static final fun transformGroup (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController;Lch/tutteli/atrium/reporting/reportables/ReportableGroupWithDescription;Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/functions/Function1;)Ljava/util/List; public static final fun transformGroup (Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController;Lch/tutteli/atrium/reporting/reportables/ReportableWithDesignation;Lch/tutteli/atrium/reporting/prerendering/text/TextPreRenderControlObject;Ljava/util/List;Ljava/util/List;I)Ljava/util/List; @@ -1856,6 +1862,7 @@ public final class ch/tutteli/atrium/reporting/reportables/Icon : java/lang/Enum public static final field BULB Lch/tutteli/atrium/reporting/reportables/Icon; public static final field DEBUG_INFO Lch/tutteli/atrium/reporting/reportables/Icon; public static final field EMPTY_STRING Lch/tutteli/atrium/reporting/reportables/Icon; + public static final field FAILING_GROUP Lch/tutteli/atrium/reporting/reportables/Icon; public static final field FAILURE Lch/tutteli/atrium/reporting/reportables/Icon; public static final field FEATURE Lch/tutteli/atrium/reporting/reportables/Icon; public static final field FEATURE_BULLET_POINT Lch/tutteli/atrium/reporting/reportables/Icon; @@ -1906,7 +1913,7 @@ public final class ch/tutteli/atrium/reporting/reportables/Reportable$Companion public final fun inlineGroupOrSingleElement (Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/InlineElement; public final fun proofExplanation (Lch/tutteli/atrium/creating/proofs/Proof;)Lch/tutteli/atrium/reporting/reportables/ProofExplanation; public final fun representation (Ljava/lang/Object;)Lch/tutteli/atrium/reporting/reportables/Representation; - public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/Row; + public final fun row (Lch/tutteli/atrium/reporting/reportables/Icon;ZLjava/util/List;)Lch/tutteli/atrium/reporting/reportables/Row; public final fun usageHintGroup (Ljava/util/List;)Lch/tutteli/atrium/reporting/reportables/UsageHintGroup; } @@ -1937,6 +1944,7 @@ public abstract interface class ch/tutteli/atrium/reporting/reportables/Represen public abstract interface class ch/tutteli/atrium/reporting/reportables/Row : ch/tutteli/atrium/reporting/reportables/Reportable { public abstract fun getColumns ()Ljava/util/List; public abstract fun getIcon ()Lch/tutteli/atrium/reporting/reportables/Icon; + public abstract fun getIncludingBorder ()Z } public abstract interface class ch/tutteli/atrium/reporting/reportables/TextElement : ch/tutteli/atrium/reporting/reportables/InlineElement { @@ -1963,7 +1971,9 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { public static final field NOT_TO_BE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; + public static final field NOT_TO_HAVE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; public static final field TO_BE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; + public static final field TO_HAVE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic; public fun getDefault ()Ljava/lang/String; public static fun getEntries ()Lkotlin/enums/EnumEntries; public fun getString ()Ljava/lang/String; @@ -1988,9 +1998,9 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public static final field AT_LEAST Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field AT_MOST Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field BLANK Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; + public static final field Companion Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof$Companion; public static final field EMPTY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field EXACTLY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; - public static final field IGNORING_CASE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field NOT_FOUND Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field NOT_TO_CONTAIN Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; public static final field NOT_TO_END_WITH Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; @@ -2010,6 +2020,20 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof; } +public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof$Companion { + public final fun getIGNORING_CASE (Lch/tutteli/atrium/reporting/reportables/Description;)Lch/tutteli/atrium/reporting/reportables/Description; +} + +public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { + public static final field EMPTY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; + public static final field SIZE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; + public fun getDefault ()Ljava/lang/String; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public fun getString ()Ljava/lang/String; + public static fun valueOf (Ljava/lang/String;)Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; + public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCollectionProof; +} + public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { public static final field NOT_TO_BE_GREATER_THAN Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof; public static final field NOT_TO_BE_LESS_THAN Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof; @@ -2025,6 +2049,24 @@ public final class ch/tutteli/atrium/reporting/reportables/descriptions/Descript public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionComparableProof; } +public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { + public static final field DAY Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field DAY_OF_WEEK Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field MONTH Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_AFTER Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_AFTER_OR_THE_SAME_POINT_IN_TIME_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_BEFORE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_BEFORE_OR_THE_SAME_POINT_IN_TIME_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_THE_SAME_DAY_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field TO_BE_THE_SAME_POINT_IN_TIME_AS Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static final field YEAR Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public fun getDefault ()Ljava/lang/String; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public fun getString ()Ljava/lang/String; + public static fun valueOf (Ljava/lang/String;)Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; + public static fun values ()[Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDateTimeLikeProof; +} + public final class ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDocumentationUtil : java/lang/Enum, ch/tutteli/atrium/reporting/reportables/Description { public static final field BECAUSE Lch/tutteli/atrium/reporting/reportables/descriptions/DescriptionDocumentationUtil; public fun getDefault ()Ljava/lang/String; @@ -2076,6 +2118,12 @@ public final class ch/tutteli/atrium/reporting/reportables/impl/DefaultRepresent public fun getRepresentation ()Ljava/lang/Object; } +public final class ch/tutteli/atrium/reporting/reportables/impl/SuffixedDescription : ch/tutteli/atrium/reporting/reportables/Description { + public fun (Lch/tutteli/atrium/reporting/reportables/Description;Ljava/lang/String;)V + public fun getDefault ()Ljava/lang/String; + public fun getString ()Ljava/lang/String; +} + public abstract interface class ch/tutteli/atrium/reporting/text/BulletPointProvider { public abstract fun getBulletPoints ()Ljava/util/Map; } @@ -2143,7 +2191,7 @@ public final class ch/tutteli/atrium/reporting/text/impl/DefaultTextMethodCallFo public final class ch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter : ch/tutteli/atrium/reporting/text/TextObjFormatter { public static final field Companion Lch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter$Companion; public static final field LIMIT I - public fun (Lch/tutteli/atrium/reporting/ObjectFormatter;)V + public fun (Lch/tutteli/atrium/reporting/ObjectFormatter;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;)V public fun format (Ljava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } @@ -2254,6 +2302,21 @@ public final class ch/tutteli/atrium/reporting/text/impl/TextSummaryAssertionGro public fun (Ljava/util/Map;Lch/tutteli/atrium/reporting/AssertionFormatterController;Lch/tutteli/atrium/reporting/AssertionPairFormatter;)V } +public abstract interface class ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator { + public abstract fun calculate (Ljava/lang/String;)I +} + +public abstract interface class ch/tutteli/atrium/reporting/theming/text/NotYetStyledString { + public static final field Companion Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString$Companion; + public abstract fun getMonospaceLength ()I + public abstract fun getUnstyled ()Ljava/lang/String; +} + +public final class ch/tutteli/atrium/reporting/theming/text/NotYetStyledString$Companion { + public final fun create (Ljava/lang/String;I)Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString; + public static synthetic fun create$default (Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString$Companion;Ljava/lang/String;IILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/NotYetStyledString; +} + public final class ch/tutteli/atrium/reporting/theming/text/Style : java/lang/Enum { public static final field DEBUG_INFO Lch/tutteli/atrium/reporting/theming/text/Style; public static final field FAILURE Lch/tutteli/atrium/reporting/theming/text/Style; @@ -2269,27 +2332,37 @@ public final class ch/tutteli/atrium/reporting/theming/text/Style : java/lang/En public abstract interface class ch/tutteli/atrium/reporting/theming/text/StyledString { public static final field Companion Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion; - public abstract fun appendUnstyled (Ljava/lang/String;)Lch/tutteli/atrium/reporting/theming/text/StyledString; public abstract fun getHorizontalAlignment ()Lch/tutteli/atrium/reporting/HorizontalAlignment; + public abstract fun getMaxLineMonospaceLength ()I public abstract fun getMaybeStyled ()Lch/tutteli/atrium/core/Option; + public abstract fun getMonospaceLength ()I public abstract fun getNoLineBreak ()Z + public abstract fun getString ()Ljava/lang/String; public abstract fun getUnstyled ()Ljava/lang/String; - public abstract fun result ()Ljava/lang/String; + public abstract fun padString (I)Ljava/lang/String; public abstract fun withHorizontalAlignment (Lch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; public abstract fun withoutLineBreaks ()Lch/tutteli/atrium/reporting/theming/text/StyledString; } public final class ch/tutteli/atrium/reporting/theming/text/StyledString$Companion { + public final fun create (Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun create$default (Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public final fun createWithPredefinedMonospaceLength (Ljava/lang/String;Lch/tutteli/atrium/core/Option;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun createWithPredefinedMonospaceLength$default (Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion;Ljava/lang/String;Lch/tutteli/atrium/core/Option;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; public final fun getCOLON_SEPARATOR ()Lch/tutteli/atrium/reporting/theming/text/StyledString; public final fun getEMPTY_STRING ()Lch/tutteli/atrium/reporting/theming/text/StyledString; - public final fun invoke (Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun invoke$default (Lch/tutteli/atrium/reporting/theming/text/StyledString$Companion;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; +} + +public final class ch/tutteli/atrium/reporting/theming/text/StyledString$DefaultImpls { + public static fun padString (Lch/tutteli/atrium/reporting/theming/text/StyledString;I)Ljava/lang/String; } public final class ch/tutteli/atrium/reporting/theming/text/StyledStringKt { - public static final fun noStyle (Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun noStyle$default (Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static final fun pad (Lch/tutteli/atrium/reporting/theming/text/StyledString;I)Ljava/lang/String; + public static final fun noStyle (Ljava/lang/String;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun noStyle (Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun noStyle$default (Ljava/lang/String;IIZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun noStyle$default (Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun padMonospace (Lch/tutteli/atrium/reporting/theming/text/StyledString;I)Ljava/lang/String; public static final fun replaceWrap (Lch/tutteli/atrium/reporting/theming/text/StyledString;Ljava/lang/String;)Ljava/lang/String; } @@ -2298,22 +2371,24 @@ public abstract interface class ch/tutteli/atrium/reporting/theming/text/TextIco } public abstract interface class ch/tutteli/atrium/reporting/theming/text/TextStyler { - public abstract fun style (Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public abstract fun style (Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public abstract fun styleWithPredefinedMonospaceLength (Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } public final class ch/tutteli/atrium/reporting/theming/text/TextStyler$DefaultImpls { - public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Ljava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun styleWithPredefinedMonospaceLength$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } public final class ch/tutteli/atrium/reporting/theming/text/TextStylerKt { - public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/core/Option;Z)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; - public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static final fun style (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public static synthetic fun style$default (Lch/tutteli/atrium/reporting/theming/text/TextStyler;Lch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator;Ljava/lang/String;Lch/tutteli/atrium/reporting/theming/text/Style;ZLch/tutteli/atrium/reporting/HorizontalAlignment;ILjava/lang/Object;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } public abstract interface class ch/tutteli/atrium/reporting/theming/text/TextThemeProvider { - public abstract fun getSupportsAnsi ()Z + public abstract fun getSupportsAnsiColours ()Z public abstract fun render (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; } @@ -2326,6 +2401,29 @@ public final class ch/tutteli/atrium/reporting/theming/text/impl/MarkdownTextIco public fun style (Lch/tutteli/atrium/reporting/reportables/Icon;)Lch/tutteli/atrium/reporting/theming/text/StyledString; } +public abstract class ch/tutteli/atrium/reporting/theming/text/impl/MonospaceCalculatorBasedStyledString : ch/tutteli/atrium/reporting/theming/text/StyledString { + public fun (Ljava/lang/String;Lch/tutteli/atrium/core/Option;ZLch/tutteli/atrium/reporting/HorizontalAlignment;)V + public fun getHorizontalAlignment ()Lch/tutteli/atrium/reporting/HorizontalAlignment; + public fun getMaybeStyled ()Lch/tutteli/atrium/core/Option; + public fun getNoLineBreak ()Z + public final fun getString ()Ljava/lang/String; + public fun getUnstyled ()Ljava/lang/String; + public fun padString (I)Ljava/lang/String; + public fun toString ()Ljava/lang/String; + public final fun withHorizontalAlignment (Lch/tutteli/atrium/reporting/HorizontalAlignment;)Lch/tutteli/atrium/reporting/theming/text/StyledString; + public final fun withoutLineBreaks ()Lch/tutteli/atrium/reporting/theming/text/StyledString; +} + +public final class ch/tutteli/atrium/reporting/theming/text/impl/MonospaceLengthPrecalculated : ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator { + public fun ()V + public fun calculate (Ljava/lang/String;)I +} + +public final class ch/tutteli/atrium/reporting/theming/text/impl/StringLengthMonospaceLengthCalculator : ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator { + public static final field INSTANCE Lch/tutteli/atrium/reporting/theming/text/impl/StringLengthMonospaceLengthCalculator; + public fun calculate (Ljava/lang/String;)I +} + public abstract class ch/tutteli/atrium/reporting/translating/ArgumentsSupportingTranslator : ch/tutteli/atrium/reporting/translating/Translator { public fun (Lch/tutteli/atrium/reporting/translating/Locale;Ljava/util/List;)V protected final fun getFallbackLocales ()Ljava/util/List; diff --git a/atrium-core/build.gradle.kts b/atrium-core/build.gradle.kts index 355da24f17..b76e586731 100644 --- a/atrium-core/build.gradle.kts +++ b/atrium-core/build.gradle.kts @@ -20,6 +20,11 @@ kotlin { implementation(prefixedProject("specs")) } } + jvmMain { + dependencies { + implementation("org.opentest4j:opentest4j:1.3.0") + } + } } } @@ -43,7 +48,8 @@ ifIsPublishing { createGenerateCoreTask( includingTarget("jvm"), - includingTarget("common", + includingTarget( + "common", //TODO 1.3.0 enable once transitioned to proofs // "/creating/charsequence/contains/creators" to { _ -> // " CharSequenceContains.CheckerStepLogic" to diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/ExplanatoryAssertionGroup.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/ExplanatoryAssertionGroup.kt index 7f7769002a..0ab3678344 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/ExplanatoryAssertionGroup.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/ExplanatoryAssertionGroup.kt @@ -27,7 +27,16 @@ internal class ExplanatoryAssertionGroup( type: ExplanatoryAssertionGroupType, explanatoryAssertions: List, private val holds: Boolean -) : EmptyNameAndRepresentationAssertionGroup(type, explanatoryAssertions) { +) : EmptyNameAndRepresentationAssertionGroup( + type, when (explanatoryAssertions.size) { + 1 -> when (val assertion = explanatoryAssertions[0]) { + is AssertionGroup -> if (assertion.type is InvisibleAssertionGroupType) assertion.assertions else explanatoryAssertions + else -> explanatoryAssertions + } + + else -> explanatoryAssertions + } +) { override fun holds() = holds diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/InvisibleAssertionGroup.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/InvisibleAssertionGroup.kt index 0b15a7f446..aeebecf771 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/InvisibleAssertionGroup.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/InvisibleAssertionGroup.kt @@ -1,5 +1,6 @@ //TODO remove file with 2.0.0 at the latest @file:Suppress("DEPRECATION") + package ch.tutteli.atrium.assertions /** @@ -8,9 +9,14 @@ package ch.tutteli.atrium.assertions *l * @param assertions The assertions of this group. */ +@Deprecated( + "Switch to Proof, will be removed with 2.0.0 at the latest", + ReplaceWith("ch.tutteli.atrium.creating.proofs.InvisibleProofGroup") +) +internal class InvisibleAssertionGroup @Deprecated( "Switch to Proof, will be removed with 2.0.0 at the latest", ReplaceWith("Proof.invisibleGroup(assertions)", "ch.tutteli.atrium.creating.proofs.Proof") ) -internal class InvisibleAssertionGroup(assertions: List) : +constructor(assertions: List) : EmptyNameAndRepresentationAssertionGroup(InvisibleAssertionGroupType, assertions) diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt index 4cbcfb208a..8d3c07bee8 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt @@ -9,28 +9,28 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable * Contains translations which are used in error like messages. */ @Deprecated( - "switch to ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages, will be removed with 2.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages") + "switch to ch.tutteli.atrium.reporting.reportables.ErrorMessages, will be removed with 2.0.0 at the latest", + ReplaceWith("ch.tutteli.atrium.reporting.reportables.ErrorMessages") ) enum class ErrorMessages(override val value: String) : StringBasedTranslatable { @Deprecated( "Will be removed with 2.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages.AT_LEAST_ONE_EXPECTATION_DEFINED") + ReplaceWith("ch.tutteli.atrium.reporting.reportables.ErrorMessages.AT_LEAST_ONE_EXPECTATION_DEFINED") ) /** @since 0.18.0 */ AT_LEAST_ONE_EXPECTATION_DEFINED("at least one expectation defined"), @Deprecated( "Will be removed with 2.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages.FORGOT_DO_DEFINE_EXPECTATION") + ReplaceWith("ch.tutteli.atrium.reporting.reportables.ErrorMessages.FORGOT_DO_DEFINE_EXPECTATION") ) /** @since 0.18.0 */ FORGOT_DO_DEFINE_EXPECTATION("You forgot to define expectations in the assertionCreator-lambda"), @Deprecated( "Will be removed with 2.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages.DEFAULT_HINT_AT_LEAST_ONE_EXPECTATION_DEFINED") + ReplaceWith("ch.tutteli.atrium.reporting.reportables.ErrorMessages.DEFAULT_HINT_AT_LEAST_ONE_EXPECTATION_DEFINED") ) /** @since 0.18.0 */ HINT_AT_LEAST_ONE_EXPECTATION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt index 0b4b1ee297..2222383c20 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt @@ -8,7 +8,7 @@ import ch.tutteli.atrium.creating.* import ch.tutteli.atrium.creating.proofs.Proof import ch.tutteli.atrium.reporting.SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages +import ch.tutteli.atrium.reporting.reportables.ErrorMessages import kotlin.reflect.KClass @ExperimentalNewExpectTypes @@ -51,7 +51,7 @@ abstract class BaseExpectImpl( ReplaceWith( "this.appendAsGroupIndicateIfOneCollected(ExpectationCreatorWithUsageHints(assertionCreator, listOf(/* .. add a custom usage hint in case you have an overload which does not expect an expectationCreator or use the generic */ ErrorMessages.DEFAULT_HINT_AT_LEAST_ONE_EXPECTATION_DEFINED))).first", "ch.tutteli.atrium.creating.ExpectationCreatorWithUsageHints", - "ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages" + "ch.tutteli.atrium.reporting.reportables.ErrorMessages" ) ) override fun appendAsGroup(assertionCreator: Expect.() -> Unit): Expect = diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt index 73950f2d0e..a15ddbe508 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt @@ -10,7 +10,7 @@ import ch.tutteli.atrium.creating.proofs.impl.DefaultInvisibleProofGroup import ch.tutteli.atrium.reporting.Text import ch.tutteli.atrium.reporting.reportables.* import ch.tutteli.atrium.reporting.reportables.descriptions.DescriptionAnyProof -import ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages +import ch.tutteli.atrium.reporting.reportables.ErrorMessages import ch.tutteli.kbox.ifNotEmpty @ExperimentalNewExpectTypes @@ -146,7 +146,7 @@ internal class CollectingExpectImpl( replaceWith = ReplaceWith( "this.appendAsGroupIndicateIfOneCollected(ExpectationCreatorWithUsageHints(assertionCreator, listOf(/* .. add a custom usage hint in case you have an overload which does not expect an expectationCreator or use the generic */ ErrorMessages.DEFAULT_HINT_AT_LEAST_ONE_EXPECTATION_DEFINED))).first", "ch.tutteli.atrium.creating.ExpectationCreatorWithUsageHints", - "ch.tutteli.atrium.reporting.reportables.descriptions.ErrorMessages" + "ch.tutteli.atrium.reporting.reportables.ErrorMessages" ) ) override fun appendAsGroup(assertionCreator: Expect.() -> Unit): CollectingExpect { diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt index f3fc0d7f55..56baf034fa 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt @@ -21,10 +21,8 @@ import ch.tutteli.atrium.reporting.prerendering.text.impl.* import ch.tutteli.atrium.reporting.prerendering.text.impl.assertion.* import ch.tutteli.atrium.reporting.text.* import ch.tutteli.atrium.reporting.text.impl.* -import ch.tutteli.atrium.reporting.theming.text.TextIconStyler -import ch.tutteli.atrium.reporting.theming.text.TextStyler -import ch.tutteli.atrium.reporting.theming.text.TextThemeProvider -import ch.tutteli.atrium.reporting.theming.text.Utf8SupportDeterminer +import ch.tutteli.atrium.reporting.theming.text.* +import ch.tutteli.atrium.reporting.theming.text.impl.* import ch.tutteli.atrium.reporting.theming.text.impl.DefaultTextIconStyler import ch.tutteli.atrium.reporting.theming.text.impl.DefaultTextStyler import ch.tutteli.atrium.reporting.theming.text.impl.DefaultThemeProvider @@ -142,7 +140,7 @@ internal object DefaultComponentFactoryContainer : ComponentFactoryContainer by ReportableFilter.failingProofsAndNonProof() }, TextIconStyler::class createSingletonVia { c -> - DefaultTextIconStyler(c.build(), c.build()) + DefaultTextIconStyler(c.build(),c.build()) }, TextStyler::class createSingletonVia { c -> DefaultTextStyler(c.build()) @@ -152,7 +150,7 @@ internal object DefaultComponentFactoryContainer : ComponentFactoryContainer by DefaultThemeProvider(c.build()) }, TextObjFormatter::class createVia { c -> - DefaultTextObjFormatter(c.build()) + DefaultTextObjFormatter(c.build(), c.build()) }, Utf8SupportDeterminer::class createVia { c -> MordantBasedUtf8SupportDeterminer(c.build()) @@ -160,6 +158,9 @@ internal object DefaultComponentFactoryContainer : ComponentFactoryContainer by Terminal::class createVia { _ -> Terminal(ansiLevel = AnsiLevel.TRUECOLOR) }, + MonospaceLengthCalculator::class createVia { _ -> + StringLengthMonospaceLengthCalculator + }, //TODO 2.0.0 remove @Suppress("DEPRECATION") @@ -270,7 +271,7 @@ internal object DefaultComponentFactoryContainer : ComponentFactoryContainer by { c -> DefaultRowTextPreRenderer(c.build()) }, { _ -> DefaultColumnTextPreRenderer() }, { c -> DefaultRepresentationTextPreRenderer(c.build()) }, - { _ -> DefaultTextElementTextPreRenderer() }, + { c -> DefaultTextElementTextPreRenderer(c.build()) }, ), TextDesignationPreRenderer::class createChainVia sequenceOf( { c -> DefaultInlineDesignatorPreRenderer(c.build()) } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/RowBuilder.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/RowBuilder.kt index 380735b0b1..96c7b8b72c 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/RowBuilder.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/RowBuilder.kt @@ -7,12 +7,13 @@ import ch.tutteli.atrium.reporting.reportables.* class RowBuilder( proofContainer: ProofContainer, - private val icon: Icon? + private val icon: Icon?, + private val includingBorder: Boolean ) : BaseBuilder>(proofContainer) { fun column(inlineElement: InlineElement, alignment: HorizontalAlignment = HorizontalAlignment.DEFAULT) = add(Reportable.column(inlineElement, alignment)) override fun build(children: List): Row = - Reportable.row(icon, children) + Reportable.row(icon, includingBorder, children) } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder.kt index 47e01e752c..ef3234c142 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/builders/impl/BaseGroupBuilder.kt @@ -88,8 +88,8 @@ abstract class BaseGroupBuilder< fun inlineGroup(vararg inlineElements: InlineElement): InlineElement = Reportable.inlineGroup(inlineElements.toList()) - fun row(icon: Icon? = null, init: RowBuilder.() -> Unit): Reportable = - add(RowBuilder(proofContainer, icon).build(init)) + fun row(icon: Icon? = null, includingBorder: Boolean = true, init: RowBuilder.() -> Unit): Reportable = + add(RowBuilder(proofContainer, icon, includingBorder).build(init)) fun text(string: String): Reportable = add(Text(string)) diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/impl/DefaultDocumentationUtils.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/impl/DefaultDocumentationUtils.kt index 4b94869723..4e00d8f8ec 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/impl/DefaultDocumentationUtils.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/proofs/impl/DefaultDocumentationUtils.kt @@ -6,6 +6,7 @@ import ch.tutteli.atrium.creating.ProofContainer import ch.tutteli.atrium.creating.proofs.DocumentationUtils import ch.tutteli.atrium.creating.proofs.Proof import ch.tutteli.atrium.creating.proofs.builders.buildProof +import ch.tutteli.atrium.reporting.Text import ch.tutteli.atrium.reporting.reportables.Icon import ch.tutteli.atrium.reporting.reportables.InlineElement import ch.tutteli.atrium.reporting.reportables.descriptions.DescriptionDocumentationUtil @@ -22,8 +23,9 @@ class DefaultDocumentationUtils : DocumentationUtils { expectationCreator ) ) - row(icon = Icon.INFORMATION_SOURCE) { + row(icon = Icon.INFORMATION_SOURCE, includingBorder = false) { column(DescriptionDocumentationUtil.BECAUSE) + column(Text.SPACE) column(reason) } } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/AtriumError.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/AtriumError.kt index 1037c85df0..56b01d1280 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/AtriumError.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/AtriumError.kt @@ -3,6 +3,11 @@ package ch.tutteli.atrium.reporting import ch.tutteli.atrium.creating.proofs.Proof import ch.tutteli.atrium.reporting.AtriumError.Companion + +expect open class AssertionErrorLikeIntermediate : Error +expect open class AssertionErrorLike : AssertionErrorLikeIntermediate + + /** * Indicates that an expectation stated via Atrium was not. * @@ -12,7 +17,7 @@ import ch.tutteli.atrium.reporting.AtriumError.Companion * * To create such an error you need to use the [Companion.create] function. */ -expect class AtriumError internal constructor(message: String, causingProof: Proof) : AssertionError { +expect class AtriumError internal constructor(message: String, causingProof: Proof) : AssertionErrorLike { /** * Represents the [Proof] which lead to this AtriumError. diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/OutputNode.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/OutputNode.kt index 2bbec6e00f..8bcdb6b925 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/OutputNode.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/OutputNode.kt @@ -18,7 +18,7 @@ data class OutputNode( require(children.isNotEmpty()) { "a node without columns need to define children" } val childWithoutColumnsNotOwnLevel = children.filter { it.definesOwnLevel.not() && it.columns.isEmpty() } require(childWithoutColumnsNotOwnLevel.isEmpty()) { - "a node without columns cannot define children with definesOwnLevel=false which don't have columns (they should be flattened instead). Following children don't define own columns:\n${ + "a node without columns cannot define children with definesOwnLevel=false which don't have columns (they should be flattened/merged into it instead, for instance, a ProofExplanation explaining an invisibleProofGroup should flatten the invisibleGroup and thus treat the children as its own). Following children don't define own columns:\n${ childWithoutColumnsNotOwnLevel.joinToString( ", " ) diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController.kt index 38d773efd3..4a8db6bc79 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/TextPreRenderController.kt @@ -1,14 +1,12 @@ package ch.tutteli.atrium.reporting.prerendering.text import ch.tutteli.atrium.assertions.ExplanatoryAssertion +import ch.tutteli.atrium.creating.proofs.InvisibleFixedClaimGroup import ch.tutteli.atrium.creating.proofs.InvisibleProofGroup import ch.tutteli.atrium.creating.proofs.Proof -import ch.tutteli.atrium.reporting.reportables.Icon +import ch.tutteli.atrium.creating.proofs.ProofGroup import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.reportables.Reportable -import ch.tutteli.atrium.reporting.reportables.ReportableGroup -import ch.tutteli.atrium.reporting.reportables.ReportableGroupWithDescription -import ch.tutteli.atrium.reporting.reportables.ReportableWithDesignation +import ch.tutteli.atrium.reporting.reportables.* import ch.tutteli.atrium.reporting.theming.text.StyledString import ch.tutteli.kbox.takeIf @@ -68,7 +66,7 @@ fun TextPreRenderController.transformSubProofGroup( fun TextPreRenderController.transformSubProofGroup( reportableGroupWithDesignation: T, controlObject: TextPreRenderControlObject, - prefixDescriptionColumns: List = listOf(StyledString.EMPTY_STRING), + prefixDescriptionColumns: List = listOf(), suffixDescriptionColumns: List = emptyList(), startMergeAtColumn: Int = 1, childTransformer: (child: Reportable) -> List, @@ -76,7 +74,10 @@ fun TextPreRenderController.transformSubProofGroup( transformGroup( reportableGroupWithDesignation, controlObject, - prefixDescriptionColumns, + // we add an empty string as additional colum because we want that description of the group spans over + // two columns, this way children's prefix icon will be in the first column and their description in the second + // allowing that they are aligned again (otherwise the icon is in the same column as the description) + prefixDescriptionColumns + listOf(StyledString.EMPTY_STRING), suffixDescriptionColumns, startMergeAtColumn, childTransformer @@ -144,6 +145,8 @@ fun determineChildControlObject( } else if (child.holds()) { controlObject.copy(prefix = Icon.SUCCESS, indentLevel = indentLevel) + } else if (child is ProofGroup && child.hasAtLeastOneLeaveProof()) { + controlObject.copy(prefix = Icon.FAILING_GROUP, indentLevel = indentLevel) } else { controlObject.copy(prefix = Icon.FAILURE, indentLevel = indentLevel) } @@ -154,3 +157,23 @@ fun determineChildControlObject( } return newControlObject ?: controlObject.copy(prefix = childPrefix, indentLevel = indentLevel) } + +fun ReportableGroup.hasAtLeastOneLeaveProof(): Boolean = + this.children.any { child -> + run { + child is Proof && + (child !is ProofGroup || (child !is InvisibleProofGroup && child !is InvisibleFixedClaimGroup || child.hasAtLeastOneLeaveProof())) + } || run { + child is FailureExplanationGroup && child.hasAtLeastOneLeaveProof() + } || run { + // if a child is a proof explanation, then we only want to show the flag in case the proof explanation + // contains a failure explanation, because the failure explanation might have a leave proof as well + // see CreateReportTest -> proofExplanation_withFailureExplanation for a case where a ProofExplanation + // contains a FailureExplanation but the FailureExplanation does not contain Proofs => i.e. don't use the + // flag + // see CreateReportTest -> proofExplanation_withFailureExplanationAndSubProofs_showsOnlyFailingProofs for + // a case where a ProofExplanation contains a FailureExplanation and it in turn contains a Proof + child is ProofExplanation && child.children.any { it is FailureExplanationGroup && it.hasAtLeastOneLeaveProof() } + } + } + diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/BaseReportableGroupWithDescriptionTextPreRenderer.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/BaseReportableGroupWithDescriptionTextPreRenderer.kt index 2af9822f7f..2a56ef360f 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/BaseReportableGroupWithDescriptionTextPreRenderer.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/BaseReportableGroupWithDescriptionTextPreRenderer.kt @@ -3,6 +3,7 @@ package ch.tutteli.atrium.reporting.prerendering.text.impl import ch.tutteli.atrium.reporting.prerendering.text.* import ch.tutteli.atrium.reporting.reportables.Icon import ch.tutteli.atrium.reporting.reportables.ReportableGroupWithDescription +import ch.tutteli.atrium.reporting.theming.text.StyledString import ch.tutteli.atrium.reporting.theming.text.TextIconStyler import kotlin.reflect.KClass @@ -19,12 +20,15 @@ internal abstract class BaseReportableGroupWithDescriptionTextPreRenderer val newControlObject = determineChildControlObject( controlObject, child, childIcon, additionalIndent = 1 ).let { - if(it.explainsProof) it.copy(explainsProof = false) else it + if (it.explainsProof) it.copy(explainsProof = false) else it } controlObject.transformChildIncludingIndentationAndPrefix(child, newControlObject) }.let { diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultFeatureProofGroupTextPreRenderer.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultFeatureProofGroupTextPreRenderer.kt index 1ddf133180..148fba4acc 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultFeatureProofGroupTextPreRenderer.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultFeatureProofGroupTextPreRenderer.kt @@ -18,18 +18,15 @@ internal class DefaultFeatureProofGroupTextPreRenderer( controlObject.transformSubProofGroup( reportable, controlObject, - // we use an empty string as additional colum because we want to indent the children by 2 and still - // span the description over the indent + prefix - prefixDescriptionColumns = listOf(iconStyler.style(Icon.FEATURE), StyledString.EMPTY_STRING), + prefixDescriptionColumns = listOf(iconStyler.style(Icon.FEATURE)), suffixDescriptionColumns = listOf(), - startMergeAtColumn = 1 // because we have a prefix from the parent group ) { child -> val newControlObject = determineChildControlObject( controlObject, child, Icon.LIST_BULLET_POINT, - // indent by two because we want that the children are after Icon.FEATURE - // (1 additional indent for the x prefix of the feature group + // indent by two, one for the Icon.FAILING_GROUP Icon (at the time of writing 🚩) and one for the + // Icon.FEATURE (we want that the children are after Icon.FEATURE) additionalIndent = 2 ) controlObject.transformChildIncludingIndentationAndPrefix(child, newControlObject) diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultInvisibleLikeProofGroupTextPreRenderer.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultInvisibleLikeProofGroupTextPreRenderer.kt index 643bdb4f18..220cca4048 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultInvisibleLikeProofGroupTextPreRenderer.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultInvisibleLikeProofGroupTextPreRenderer.kt @@ -8,9 +8,14 @@ import ch.tutteli.atrium.reporting.reportables.Reportable internal class DefaultInvisibleLikeProofGroupTextPreRenderer : TextPreRenderer { + override fun canTransform(reportable: Reportable): Boolean = reportable is InvisibleProofGroup || - reportable is InvisibleFixedClaimGroup + reportable is InvisibleFixedClaimGroup || + @Suppress("DEPRECATION") + run { + reportable is ch.tutteli.atrium.assertions.InvisibleAssertionGroup + } override fun transform( reportable: Reportable, diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultRootProofGroupTextPreRenderer.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultRootProofGroupTextPreRenderer.kt index 21e9f4d0e2..256278ee51 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultRootProofGroupTextPreRenderer.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultRootProofGroupTextPreRenderer.kt @@ -12,9 +12,9 @@ internal class DefaultRootProofGroupTextPreRenderer : TypedTextPreRenderer listOf(first) else -> { - columns.asSequence().drop(1) - .fold(ArrayList(columns.size * 2 - 1).also { it.add(first) }) { acc, column -> - acc.also { - it.add(StyledString.COLON_SEPARATOR) - it.add(controlObject.transformAndGetSingleColumnOfSingleNode(column)) + if(reportable.includingBorder) { + columns.asSequence().drop(1) + .fold(ArrayList(columns.size * 2 - 1).also { it.add(first) }) { acc, column -> + acc.also { + it.add(StyledString.COLON_SEPARATOR) + it.add(controlObject.transformAndGetSingleColumnOfSingleNode(column)) + } } - } + } else { + columns.map { controlObject.transformAndGetSingleColumnOfSingleNode(it) } + } } } } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultTextElementTextPreRenderer.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultTextElementTextPreRenderer.kt index 4f5e00ab07..73c3b4102a 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultTextElementTextPreRenderer.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/DefaultTextElementTextPreRenderer.kt @@ -1,16 +1,19 @@ package ch.tutteli.atrium.reporting.prerendering.text.impl +import ch.tutteli.atrium.reporting.theming.text.MonospaceLengthCalculator import ch.tutteli.atrium.reporting.prerendering.text.TextPreRenderControlObject import ch.tutteli.atrium.reporting.prerendering.text.OutputNode import ch.tutteli.atrium.reporting.prerendering.text.TypedTextPreRenderer import ch.tutteli.atrium.reporting.reportables.TextElement import ch.tutteli.atrium.reporting.theming.text.noStyle -internal class DefaultTextElementTextPreRenderer : TypedTextPreRenderer(TextElement::class) { +internal class DefaultTextElementTextPreRenderer( + private val monospaceLengthCalculator: MonospaceLengthCalculator +) : TypedTextPreRenderer(TextElement::class) { override fun transformIt(reportable: TextElement, controlObject: TextPreRenderControlObject): List = listOf( OutputNode( - columns = listOf(reportable.string.noStyle(noLineBreak = false)), + columns = listOf(reportable.string.noStyle(monospaceLengthCalculator, noLineBreak = false)), emptyList(), definesOwnLevel = true ) diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/assertion/DefaultAssertionGroupTextPreRenderer.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/assertion/DefaultAssertionGroupTextPreRenderer.kt index 80df134b86..6a49245a6b 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/assertion/DefaultAssertionGroupTextPreRenderer.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/prerendering/text/impl/assertion/DefaultAssertionGroupTextPreRenderer.kt @@ -38,17 +38,12 @@ class DefaultAssertionGroupTextPreRenderer(private val iconStyler: TextIconStyle } is InvisibleAssertionGroupType -> - controlObject.transformChild( - Proof.invisibleGroup(assertionGroup.assertions), - controlObject - ) + controlObject.transformChild(Proof.invisibleGroup(assertionGroup.assertions), controlObject) is FeatureAssertionGroupType -> controlObject.transformSubProofGroup( reportable, controlObject, - // we use an empty string as additional colum because we want to indent the children by 2 and still - // span the description over the indent + prefix - prefixDescriptionColumns = listOf(iconStyler.style(Icon.FEATURE), StyledString.EMPTY_STRING), + prefixDescriptionColumns = listOf(iconStyler.style(Icon.FEATURE)), suffixDescriptionColumns = listOf(), startMergeAtColumn = 1 // because we have a prefix from the parent group ) { child -> @@ -66,8 +61,7 @@ class DefaultAssertionGroupTextPreRenderer(private val iconStyler: TextIconStyle is ListAssertionGroupType -> if (controlObject.explainsProof && assertionGroup.representation != Text.EMPTY) { // if we are in an ExplanatoryAssertionGroup, and the listGroup has a representation, - // then we want to show it in reporting (with proofs, a debugGroup never consists of proofs - // and hence this + // then we want to show it in reporting controlObject.transformSubProofGroup(reportable, controlObject.copy(explainsProof = false)) { child -> val newControlObject = determineChildControlObject( controlObject, diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/ErrorMessages.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/ErrorMessages.kt new file mode 100644 index 0000000000..657456417c --- /dev/null +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/ErrorMessages.kt @@ -0,0 +1,22 @@ +package ch.tutteli.atrium.reporting.reportables + +/** + * Contains [TextElement]s which are used in error like messages. + */ +enum class ErrorMessages(override val string: String) : TextElement { + + /** @since 1.3.0 (but was in ch.tutteli.atrium.creating.ErrorMessages since 0.18.0) */ + AT_LEAST_ONE_EXPECTATION_DEFINED("at least one expectation defined"), + + /** @since 1.3.0 (but was in ch.tutteli.atrium.creating.ErrorMessages since 0.18.0) */ + FORGOT_DO_DEFINE_EXPECTATION("You forgot to create expectations in the expectationCreator-lambda"), + + /** @since 1.3.0 */ + DEFAULT_HINT_AT_LEAST_ONE_EXPECTATION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), + + /** @since 1.3.0 (but was in ch.tutteli.atrium.translations.ErrorMessages before) */ + DESCRIPTION_BASED_ON_SUBJECT("CANNOT show description as it is based on subject which is not defined"), + + /** @since 1.3.0 (but was in ch.tutteli.atrium.translations.ErrorMessages before) */ + REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED("CANNOT evaluate representation as it is based on subject which is not defined."), +} diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Icon.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Icon.kt index d600ac25de..a5668f35dd 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Icon.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Icon.kt @@ -7,6 +7,7 @@ enum class Icon : InlineElement { DEBUG_INFO, EMPTY_STRING, FAILURE, + FAILING_GROUP, FEATURE, FEATURE_BULLET_POINT, GROUPING_BULLET_POINT, diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Reportable.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Reportable.kt index 07397d9df7..894dcb5cb3 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Reportable.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/Reportable.kt @@ -39,8 +39,10 @@ interface Reportable { return DefaultProofExplanation(proofToExplain) } - fun failureExplanationGroup(description: InlineElement, reportables: List): FailureExplanationGroup = - DefaultFailureExplanationGroup(description, reportables) + fun failureExplanationGroup( + description: InlineElement, + reportables: List + ): FailureExplanationGroup = DefaultFailureExplanationGroup(description, reportables) //TODO 1.3.0 note sure we need this fun informationGroup(description: InlineElement, reportables: List): InformationGroup = @@ -51,6 +53,7 @@ interface Reportable { fun debugGroup(description: InlineElement, reportables: List): DebugGroup = DefaultDebugGroup(description, reportables) + //TODO 1.3.0 remove? fun inlineGroupOrSingleElement(inlineElements: List): InlineElement = takeIf(inlineElements.size == 1) { inlineElements[0] @@ -58,7 +61,8 @@ interface Reportable { fun inlineGroup(inlineElements: List): InlineGroup = DefaultInlineGroup(inlineElements) - fun row(icon: Icon?, columns: List): Row = DefaultRow(icon, columns) + fun row(icon: Icon?, includingBorder: Boolean, columns: List): Row = + DefaultRow(icon, includingBorder, columns) fun column(inlineElement: InlineElement, alignment: HorizontalAlignment): Column = DefaultColumn(inlineElement, alignment) diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic.kt index c49f0aa1a0..6c33c38e7e 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionBasic.kt @@ -7,6 +7,11 @@ import ch.tutteli.atrium.reporting.reportables.Description * a different wording in two different expectation functions. */ enum class DescriptionBasic(override val string: String) : Description { + /** @since 1.3.0 (but was in DescriptionBasic of atrium-translations before) */ + TO("to"), + + /** @since 1.3.0 (but was in DescriptionBasic of atrium-translations before) */ + NOT_TO("not to"), /** @since 1.3.0 (but was in DescriptionBasic of atrium-translations before) */ TO_BE("to be"), @@ -19,4 +24,7 @@ enum class DescriptionBasic(override val string: String) : Description { /** @since 1.3.0 (but was since 0.18.0 in DescriptionBasic of atrium-translations before) */ NOT_TO_HAVE("not to have"), + + /** @since 1.3.0 (but was since 0.18.0 in DescriptionBasic of atrium-translations before) */ + WAS("was"), } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof.kt index bc4759ad2e..e93e0d51de 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionCharSequenceProof.kt @@ -7,6 +7,8 @@ import ch.tutteli.atrium.reporting.reportables.impl.SuffixedDescription * Contains [Description]s that are related to expectation functions which are applicable to [CharSequence]. */ enum class DescriptionCharSequenceProof(override val string: String) : Description { + //TOD 1.3.0 consider to change to `to be at least/most`, `to be exactly` etc. + /** @since 1.3.0 (but was since 0.18.0 in atrium-translations DescriptionCharSequenceExpectation) */ AT_LEAST("is at least"), diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionFloatingPointProof.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionFloatingPointProof.kt new file mode 100644 index 0000000000..5f317024aa --- /dev/null +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionFloatingPointProof.kt @@ -0,0 +1,17 @@ +package ch.tutteli.atrium.reporting.reportables.descriptions + +import ch.tutteli.atrium.reporting.reportables.Description + +/** + * Contains [Description]s that are related to expectation functions which are applicable to floating point numbers. + */ +enum class DescriptionFloatingPointProof(override val string: String) : Description { + /** @since 1.3.0 (was in DescriptionFloatingPointExpectation since 0.18.0) */ + TO_EQUAL_WITH_ERROR_TOLERANCE("to equal (error ± %s)"), + + /** @since 1.3.0 (was in DescriptionFloatingPointExpectation since 0.18.0) */ + FAILURE_DUE_TO_FLOATING_POINT_NUMBER("failure might be due to using %s, see exact check on the next line"), + + /** @since 1.3.0 (was in DescriptionFloatingPointExpectation since 0.18.0) */ + TO_EQUAL_WITH_ERROR_TOLERANCE_EXPLAINED("exact check was |%s - %s| = %s ≤ %s") +} diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionIterableLikeProof.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionIterableLikeProof.kt new file mode 100644 index 0000000000..589d00ba01 --- /dev/null +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionIterableLikeProof.kt @@ -0,0 +1,109 @@ +// TODO remove with 2.0.0 at the latest +@file:Suppress("DEPRECATION") + +package ch.tutteli.atrium.reporting.reportables.descriptions + +import ch.tutteli.atrium.reporting.reportables.Description + +/** + * Contains [Description]s that are related to expectation functions which are applicable to [Iterable] like subjects. + */ +enum class DescriptionIterableLikeProof(override val string: String) : Description { + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + ALL_ELEMENTS("elements need all"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + AN_ELEMENT_WHICH_NEEDS("an element which needs"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + AN_ELEMENT_WHICH_EQUALS("an element which equals"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + AT_LEAST("is at least"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + AT_MOST("is at most"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + TO_CONTAIN("to contain"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + NOT_TO_CONTAIN("not to contain"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 1.0.0) */ + USE_NOT_TO_HAVE_ELEMENTS_OR_NONE("use %s if you don't care about the empty case, then the expectation would have been met."), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + ELEMENT_WITH_INDEX("element %s"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + EXACTLY("is exactly"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + IN_ANY_ORDER("%s, in any order"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + IN_ANY_ORDER_ONLY("%s only, in any order"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + IN_ORDER("%, in order"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + IN_ORDER_ONLY("%s only, in order"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + IN_ORDER_ONLY_GROUPED("%s only, in order, grouped"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + INDEX("index %s"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + INDEX_FROM_TO("index %s..%s"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + NUMBER_OF_SUCH_ELEMENTS("number of such elements"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + SIZE_EXCEEDED("❗❗ hasNext() returned false"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + WARNING_ADDITIONAL_ELEMENTS("additional elements detected"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + WARNING_MISMATCHES("following elements were mismatched"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + WARNING_MISMATCHES_ADDITIONAL_ELEMENTS("mismatches and additional elements detected"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + A_NEXT_ELEMENT("a next element"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + NO_ELEMENTS("❗❗ cannot be determined, empty IterableLike"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + DUPLICATE_ELEMENTS("duplicate elements"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + DUPLICATED_BY("duplicated by index: %s"), + + //TODO 1.3.0 remove, I think this is no longer needed + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + ELEMENT_NOT_FOUND("but no such element was found"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 0.18.0) */ + NUMBER_OF_ELEMENTS_FOUND("and %s such elements were found"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 1.0.0) */ + NOT_TO_HAVE_ELEMENTS_OR_ANY("not to have elements or any of it needs"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 1.0.0) */ + NOT_TO_HAVE_ELEMENTS_OR_ALL("not to have elements or all need"), + + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 1.0.0) */ + NOT_TO_HAVE_ELEMENTS_OR_NONE("not to have elements or none"), + + //TODO 1.3.0 remove 'but' as soon as we use !! as icon + /** @since 1.3.0 (but was in DescriptionIterableLikeExpectation since 1.0.0) */ + NEITHER_EMPTY_NOR_ELEMENT_FOUND("but it had next element(s) and none matched the requirements"), +} diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionListLikeProof.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionListLikeProof.kt new file mode 100644 index 0000000000..f221d021ea --- /dev/null +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionListLikeProof.kt @@ -0,0 +1,11 @@ +package ch.tutteli.atrium.reporting.reportables.descriptions + +import ch.tutteli.atrium.reporting.reportables.Description + +/** + * Contains [Description]s that are related to expectation functions which are applicable to [List] like subjects. + */ +enum class DescriptionListLikeProof(override val string: String) : Description { + /** @since 0.18.0 */ + INDEX_OUT_OF_BOUNDS("❗❗ Index out of bounds") +} diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionResultProof.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionResultProof.kt new file mode 100644 index 0000000000..2f55bd1b8c --- /dev/null +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/DescriptionResultProof.kt @@ -0,0 +1,20 @@ +package ch.tutteli.atrium.reporting.reportables.descriptions + +import ch.tutteli.atrium.reporting.reportables.Description + +/** + * Contains [Description]s that are related to expectation functions which are applicable to [Result]. + */ +enum class DescriptionResultProof(override val string: String) : Description { + /** @since 1.3.0 (was in DescriptionResultExpectation since 0.18.0) */ + IS_NOT_SUCCESS("❗❗ is not a Success"), + + /** @since 1.3.0 (was in DescriptionResultExpectation since 0.18.0) */ + VALUE("value"), + + /** @since 1.3.0 (was in DescriptionResultExpectation since 0.18.0) */ + IS_NOT_FAILURE("❗❗ is not failure"), + + /** @since 1.3.0 (was in DescriptionResultExpectation since 0.18.0) */ + EXCEPTION("exception") +} diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/ErrorMessages.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/ErrorMessages.kt deleted file mode 100644 index 2f001c1e58..0000000000 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/descriptions/ErrorMessages.kt +++ /dev/null @@ -1,20 +0,0 @@ -package ch.tutteli.atrium.reporting.reportables.descriptions - -import ch.tutteli.atrium.reporting.reportables.TextElement - -/** - * Contains [TextElement]s which are used in error like messages. - */ -enum class ErrorMessages(override val string: String) : TextElement { - - /** @since 1.3.0 (but existed in ch.tutteli.atrium.creating.ErrorMessages since @since 0.18.0) */ - AT_LEAST_ONE_EXPECTATION_DEFINED("at least one expectation defined"), - - /** @since 1.3.0 (but existed in ch.tutteli.atrium.creating.ErrorMessages since @since 0.18.0) */ - FORGOT_DO_DEFINE_EXPECTATION("You forgot to create expectations in the expectationCreator-lambda"), - - /** @since 1.3.0 */ - DEFAULT_HINT_AT_LEAST_ONE_EXPECTATION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), - /** @since 1.3.0 */ - NO_PROF_ADDED_IN_PROOF_GROUP("no Proof added within a ProofGroupBuilder, at least one expected") -} diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/impl/reportableGroups.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/impl/reportableGroups.kt index 82dee9d73a..5662c74fd3 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/impl/reportableGroups.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/impl/reportableGroups.kt @@ -59,6 +59,7 @@ internal class DefaultInlineGroup( internal class DefaultRow( override val icon: Icon?, + override val includingBorder: Boolean, override val columns: List ) : Row { init { diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/reportableGroups.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/reportableGroups.kt index 43ef5068a4..eb60a9f576 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/reportableGroups.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/reportables/reportableGroups.kt @@ -36,6 +36,7 @@ interface InlineGroup : InlineElement { interface Row : Reportable { val icon: Icon? + val includingBorder: Boolean val columns: List } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter.kt index 31efdbba73..fda229557c 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextObjFormatter.kt @@ -1,37 +1,51 @@ package ch.tutteli.atrium.reporting.text.impl import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.reporting.LazyRepresentation import ch.tutteli.atrium.reporting.ObjectFormatter import ch.tutteli.atrium.reporting.Text +import ch.tutteli.atrium.reporting.theming.text.MonospaceLengthCalculator +import ch.tutteli.atrium.reporting.theming.text.impl.StringLengthMonospaceLengthCalculator import ch.tutteli.atrium.reporting.reportables.TextElement import ch.tutteli.atrium.reporting.text.TextObjFormatter import ch.tutteli.atrium.reporting.theming.text.StyledString -import ch.tutteli.atrium.reporting.theming.text.TextStyler import ch.tutteli.atrium.reporting.theming.text.noStyle -import kotlin.reflect.KClass -class DefaultTextObjFormatter(private val deprecatedObjectFormatter: ObjectFormatter) : TextObjFormatter { +class DefaultTextObjFormatter( + private val deprecatedObjectFormatter: ObjectFormatter, + private val monospaceLengthCalculator: MonospaceLengthCalculator +) : TextObjFormatter { override fun format(value: Any?): StyledString = when (value) { null -> format(Text.NULL) - is Char -> "'$value'".noStyle() - is Boolean -> value.toString().noStyle() + //TODO 1.4.0 introduce different styles for different types, i.e. char, boolean, string etc. so that + // we have more like pretty printing in the output + is Char -> "'$value'".noStyle(monospaceLengthCalculator) + is Boolean -> value.toString().noStyle(StringLengthMonospaceLengthCalculator) + is Int, is Long, is Float, is Double, - is Number -> value.toString().noStyle() - //TODO 1.4.0 format float, long, Date, etc. according to default locale specified in verb + is Number -> + //TODO 1.4.0 format float, long, Date, etc. according to default locale specified in verb + value.toString().noStyle(StringLengthMonospaceLengthCalculator) + is String -> formatString(value) - is TextElement -> value.string.noStyle(noLineBreak = false) + is TextElement -> value.string.noStyle(monospaceLengthCalculator, noLineBreak = false) //TODO 1.3.0 we should be able to return multiple columns in this case //TODO 1.4.0 introduce an Enum style - is Enum<*> -> (value.toString() + INDENT + "(" + (value::class.fullName) + ")").noStyle() + is Enum<*> -> (value.toString() + INDENT + "(" + (value::class.fullName) + ")").noStyle( + monospaceLengthCalculator + ) + + // Note, in theory a class name can contain any Unicode character on the JVM (even a zero-width space). + // We assume that no other chars than ascii letters are used and hence no need to calculate the + // monospaceLength + is Throwable -> value::class.fullName.noStyle(StringLengthMonospaceLengthCalculator) + else -> deprecatedObjectFormatter.format(value).noStyle(monospaceLengthCalculator, noLineBreak = false) + //TODO 1.4.0 introduce a Regex style - is Throwable -> value::class.fullName.noStyle() - else -> deprecatedObjectFormatter.format(value).noStyle(noLineBreak = false) } private fun limitRepresentation(value: String): String = @@ -42,9 +56,9 @@ class DefaultTextObjFormatter(private val deprecatedObjectFormatter: ObjectForma val s = "\"\"\"\n" + (if (value.length > LIMIT) "${value.substring(0, LIMIT)}\n..." else value) + "\n" + "\"\"\"" - s.noStyle(noLineBreak = false) + s.noStyle(monospaceLengthCalculator, noLineBreak = false) } else { - "\"${limitRepresentation(value)}\"".noStyle(noLineBreak = false) + "\"${limitRepresentation(value)}\"".noStyle(monospaceLengthCalculator, noLineBreak = false) } companion object { diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextReporter.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextReporter.kt index 2ac50193f4..8129c7b0e3 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextReporter.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/text/impl/DefaultTextReporter.kt @@ -9,7 +9,6 @@ import ch.tutteli.atrium.reporting.prerendering.text.TextPreRenderController import ch.tutteli.atrium.reporting.reportables.Reportable import ch.tutteli.atrium.reporting.theming.text.StyledString import ch.tutteli.atrium.reporting.theming.text.checkIsNoLineBreakDueToMergeColumns -import ch.tutteli.atrium.reporting.theming.text.pad import ch.tutteli.kbox.ifWithinBound class DefaultTextReporter( @@ -25,30 +24,35 @@ class DefaultTextReporter( ) val rootNode = rootNodes[0] val sb = StringBuilder() - format(rootNode, emptyList(), sb, calculateMaxLengths(rootNode, mutableListOf())) + format(rootNode, emptyList(), sb, calculateMaxMonospaceLengths(rootNode, mutableListOf())) return sb } - private fun format(outputNode: OutputNode, indentLevels: List, sb: StringBuilder, maxLengths: List) { + private fun format( + outputNode: OutputNode, + indentLevels: List, + sb: StringBuilder, + maxMonospaceLengths: List + ) { fun indentWithSpaces(indentLevel: Int, untilColumn: Int) { (0 until minOf(indentLevel, untilColumn)).forEach { sb.appendSpaces(indentLevels[it]) } (indentLevel until untilColumn).forEach { i -> - sb.appendSpaces(maxLengths[i]) + sb.appendSpaces(maxMonospaceLengths[i]) } } fun appendColumn(columns: List, index: Int) { val styledString = columns[index] if (styledString.noLineBreak) { - sb.append(styledString.pad(maxLengths[index])) + sb.append(styledString.padString(maxMonospaceLengths[index])) } else { val lines = styledString.unstyled.split(Regex("\r\n|\n")) if (lines.size == 1) { // no newline, we can just pad the styledString - sb.append(styledString.pad(maxLengths[index])) + sb.append(styledString.padString(maxMonospaceLengths[index])) } else { throw UnsupportedOperationException("wrapping (i.e. noLineBreak=false) is only supported for the last column") } @@ -66,7 +70,7 @@ class DefaultTextReporter( val styledString = columns[i] //TODO 1.3.0 what about wrapping throw an error as well? val indent = indentLevels[i] - sb.append(styledString.pad(if (indent > 0) indent else 0)) + sb.append(styledString.padString(if (indent > 0) indent else 0)) } val startIndex = if (mergeColumns == 0) { @@ -85,15 +89,15 @@ class DefaultTextReporter( repeat(mergeColumns) { val styledString = columns[index] checkIsNoLineBreakDueToMergeColumns(styledString) - sb.append(styledString.result()) - additionalPadding += maxLengths[index] - styledString.unstyled.length + sb.append(styledString.getString()) + additionalPadding += maxMonospaceLengths[index] - styledString.monospaceLength ++index } val styledString = columns[index] checkIsNoLineBreakDueToMergeColumns(styledString) sb.append( - styledString.pad(additionalPadding + maxLengths[index]) + styledString.padString(additionalPadding + maxMonospaceLengths[index]) ) ++index } @@ -104,9 +108,9 @@ class DefaultTextReporter( } val lastColumn = columns[lastIndex] if (lastColumn.noLineBreak) { - sb.append(lastColumn.result()) + sb.append(lastColumn.getString()) } else { - val lines = lastColumn.result().split(Regex("\r\n|\n")) + val lines = lastColumn.getString().split(Regex("\r\n|\n")) sb.append(lines.first()) lines.drop(1).forEach { line -> sb.appendln() @@ -120,7 +124,7 @@ class DefaultTextReporter( appendColumns(outputNode) val indentLevelsForChildrenWhichDoNotDefineOwnLevel = - indentLevels + maxLengths.asSequence().drop(indentLevels.size) + indentLevels + maxMonospaceLengths.asSequence().drop(indentLevels.size) outputNode.children.forEachIndexed { index, child -> if (outputNode.columns.isNotEmpty() || index > 0) { @@ -128,12 +132,12 @@ class DefaultTextReporter( } if (child.definesOwnLevel) { - val (newIndentLevels, newMaxLengths) = calculateIndentLevelsAndMaxLengths( - child, outputNode, indentLevels, maxLengths + val (newIndentLevels, newMaxMonospaceLengths) = calculateIndentLevelsAndMaxLengths( + child, outputNode, indentLevels, maxMonospaceLengths ) - format(child, newIndentLevels, sb, newMaxLengths) + format(child, newIndentLevels, sb, newMaxMonospaceLengths) } else { - format(child, indentLevelsForChildrenWhichDoNotDefineOwnLevel, sb, maxLengths) + format(child, indentLevelsForChildrenWhichDoNotDefineOwnLevel, sb, maxMonospaceLengths) } } } @@ -142,9 +146,21 @@ class DefaultTextReporter( child: OutputNode, parent: OutputNode, parentIndentLevels: List, - parentMaxLengths: List + parentMaxMonospaceLengths: List ): Pair, List> { - val newMaxLengths = calculateMaxLengths(child, parentMaxLengths.take(parent.indentLevel + 1)) + val newMaxMonospaceLengths = calculateMaxMonospaceLengths( + child, + parentMaxMonospaceLengths.take( + //TODO 1.3.0 take final decision, change and execute CreateReportTest +// run { +// parent.children.filter { it.definesOwnLevel.not() } +// .minOfOrNull { it.indentLevel } +// ?: +// parent.indentLevel +// } + 1 + child.indentLevel + ) + ) val indentLevelsInheritedFromParent = run { // the child defines an own level and hence also own indent levels. It only "inherits" the @@ -157,12 +173,13 @@ class DefaultTextReporter( // above the debug group `(d)` defines an own level. Since it is not indented at all, it doesn't // "inherit" any identLevel from the root group. On the other hand, the usage hint group `(u)` which // defines an own level as well, inherits one indent level from the debug group (indentLevel[0] = 4) - parentIndentLevels.asSequence().take(child.indentLevel) + if (child.indentLevel == 0) emptySequence() + else parentIndentLevels.asSequence().take(child.indentLevel) } - val indentLevelsDeducedFromMaxLengthOfParent = run { + val indentLevelsDeducedFromMaxMonospaceLengthOfParent = run { - val maxLengthsFromParentToConvertToIndent = run { + val maxMonospaceLengthsFromParentToConvertToIndent = run { // TODO 1.4.0 consider the following, once we drop ExplanatoryAssertionGroup then we don't have any // pre-renderer left which defines an outputNode without columns but with definesOwnLevel=true // in such a case the if branch is always taken and we could simplify this code (we should then @@ -181,54 +198,58 @@ class DefaultTextReporter( // `(i)` is an ExplanatoryAssertionGroup and the `stacktrace` is a proof group wrapped into another // ExplanatoryAssertionGroup. The indentLevel of `(i)` is 0 here, same same for the hidden // ExplanatoryGroup (i.e. child.indentLevel - parent.indentLevel would be 0). However, `stacktrace` - // has indentLevel=1 which only works if we take the maxLength[0] from the parent (because the - // nextMaxLength[0] = 0) - val numberOfZeroIndents = newMaxLengths.asSequence() + // has indentLevel=1 which only works if we take the maxMonospaceLength[0] from the parent (because + // the newMaxMonospaceLength[0] = 0) + val numberOfZeroIndents = newMaxMonospaceLengths.asSequence() .drop(child.indentLevel) .takeWhile { it == 0 }.count() maxOf(child.indentLevel - parent.indentLevel, numberOfZeroIndents) } } - parentMaxLengths.asSequence() + if(maxMonospaceLengthsFromParentToConvertToIndent == 0) emptySequence() + else parentMaxMonospaceLengths.asSequence() .drop(minOf(parentIndentLevels.size, child.indentLevel)) - .take(maxLengthsFromParentToConvertToIndent) + .take(maxMonospaceLengthsFromParentToConvertToIndent) } val newIndentLevels = run { - indentLevelsInheritedFromParent + indentLevelsDeducedFromMaxLengthOfParent + indentLevelsInheritedFromParent + indentLevelsDeducedFromMaxMonospaceLengthOfParent }.toList() - return newIndentLevels to newMaxLengths + return newIndentLevels to newMaxMonospaceLengths } - private fun calculateMaxLengths(node: OutputNode, parentMaxLengthsToConsider: List): List { - val maxLengths = mutableListOf() - maxLengths.addAll(parentMaxLengthsToConsider) + private fun calculateMaxMonospaceLengths( + node: OutputNode, + parentMaxMonospaceLengthsToConsider: List + ): List { + val maxMonospaceLengths = mutableListOf() + maxMonospaceLengths.addAll(parentMaxMonospaceLengthsToConsider) - fun updateMaxLengthsIfNecessary(index: Int, length: Int) { - maxLengths.ifWithinBound( + fun updateMaxMonospaceLengthsIfNecessary(index: Int, length: Int) { + maxMonospaceLengths.ifWithinBound( index, thenBlock = { - if (maxLengths[index] < length) { - maxLengths[index] = length + if (maxMonospaceLengths[index] < length) { + maxMonospaceLengths[index] = length } }, - elseBlock = { maxLengths.add(index, length) } + elseBlock = { maxMonospaceLengths.add(index, length) } ) } - fun updateMaxLengthsIfNecessary(index: Int, styledString: StyledString) { - updateMaxLengthsIfNecessary(index, styledString.getMaxUnstyledLineLength()) + fun updateMaxMonospaceLengthsIfNecessary(index: Int, styledString: StyledString) { + updateMaxMonospaceLengthsIfNecessary(index, styledString.maxLineMonospaceLength) } - fun updateMaxLengths(columns: Iterable>) { + fun updateMaxMonospaceLengths(columns: Iterable>) { columns.forEach { (index, styledString) -> - updateMaxLengthsIfNecessary(index, styledString) + updateMaxMonospaceLengthsIfNecessary(index, styledString) } } - fun updateMaxLengths(child: OutputNode) = - updateMaxLengths(child.columns.withIndex()) + fun updateMaxMonospaceLengths(child: OutputNode) = + updateMaxMonospaceLengths(child.columns.withIndex()) // if we have children without own columns (i.e. invisible groups) then we need to take their children // into account as well. @@ -240,19 +261,19 @@ class DefaultTextReporter( childrenToTakeIntoAccount .filterNot { it.definesOwnLevel } - .forEach(::updateMaxLengths) + .forEach(::updateMaxMonospaceLengths) - // we are still interested in the first column of children which define an own level as the prefix (which is - // the first column after indent of this node) still counts towards the alignment of this node. Now, if the child - // should be further indented (i.e. prefix is after node.indentLevel + 1) then it doesn't count towards the - // lengths of this node + // we are still interested in the first column of children which define an own level, as the prefix (which is + // the first column after indent of this node) still counts towards the alignment of this node. Now, if the + // child should be further indented (i.e. prefix is after node.indentLevel + 1) then it doesn't count towards + // the lengths of this node childrenToTakeIntoAccount .filter { it.definesOwnLevel } .flatMap { it.columns.asSequence().withIndex().take(node.indentLevel + 1) } .forEach { (index, styledString) -> - updateMaxLengthsIfNecessary(index, styledString) + updateMaxMonospaceLengthsIfNecessary(index, styledString) } val columns = node.columns @@ -263,36 +284,31 @@ class DefaultTextReporter( val (lastIndex, lastStyledString) = mergedColumns.last() // If all children definesOnwLevel=true and itself indent more than the node + 1 then the columns between - // indent and startMergeAtColumn were not calculated yet, i.e. are not defined yet in maxLengths, we - // initialise them here with 0 in such as case - (maxLengths.size until node.startMergeAtColumn).forEach { index -> - maxLengths.add(index, 0) + // indent and startMergeAtColumn were not calculated yet, i.e. are not defined yet in maxMonospaceLengths, + // we initialise them here with 0 in such as case + (maxMonospaceLengths.size until node.startMergeAtColumn).forEach { index -> + maxMonospaceLengths.add(index, 0) } // if we merge columns and the children's indent is in the range of the merged columns then those columns - // would have a length of 0 if we don't calculate the length of those columns as well. + // would have a monospaceLength of 0 if we don't calculate the monospaceLength of those columns as well. (node.startMergeAtColumn until lastIndex).forEach { index -> - updateMaxLengthsIfNecessary(index, columns[index]) + updateMaxMonospaceLengthsIfNecessary(index, columns[index]) } - val mergedLength = mergedColumns + val mergedMonospaceLength = mergedColumns .take(mergedColumns.size - 1) .sumOf { (index, value) -> - value.unstyled.length - maxLengths[index] - } + lastStyledString.unstyled.length + value.monospaceLength - maxMonospaceLengths[index] + } + lastStyledString.monospaceLength - updateMaxLengthsIfNecessary(lastIndex, mergedLength) - updateMaxLengths(rest) + updateMaxMonospaceLengthsIfNecessary(lastIndex, mergedMonospaceLength) + updateMaxMonospaceLengths(rest) } else { - updateMaxLengths(columns.withIndex()) + updateMaxMonospaceLengths(columns.withIndex()) } - return maxLengths + return maxMonospaceLengths } - - private fun StyledString.getMaxUnstyledLineLength() = - if (noLineBreak) unstyled.length - else unstyled.split("\n").maxOf { it.length } - } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator.kt new file mode 100644 index 0000000000..0b42efee9b --- /dev/null +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/MonospaceLengthCalculator.kt @@ -0,0 +1,5 @@ +package ch.tutteli.atrium.reporting.theming.text + +interface MonospaceLengthCalculator { + fun calculate(string: String): Int +} diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/StyledString.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/StyledString.kt index cc5c332fa7..8c33259f31 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/StyledString.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/StyledString.kt @@ -5,8 +5,25 @@ import ch.tutteli.atrium.core.Option import ch.tutteli.atrium.core.polyfills.appendSpaces import ch.tutteli.atrium.reporting.BUG_REPORT_URL import ch.tutteli.atrium.reporting.HorizontalAlignment -import ch.tutteli.atrium.reporting.theming.text.impl.DefaultStyledString -import ch.tutteli.atrium.reporting.theming.text.impl.PredefinedNoStyleStyledString +import ch.tutteli.atrium.reporting.theming.text.impl.CalculatedMonospaceStyledString +import ch.tutteli.atrium.reporting.theming.text.impl.PrecalculatedMonospaceStyledString +import ch.tutteli.atrium.reporting.theming.text.impl.PredefinedNoStyleNoLineBreakStyledString +import ch.tutteli.kbox.identity + +interface NotYetStyledString { + val unstyled: String + val monospaceLength: Int + + companion object { + fun create(unstyled: String, monospaceLength: Int = unstyled.length): NotYetStyledString = + DefaultNotYetStyledString(unstyled, monospaceLength) + } +} + +internal class DefaultNotYetStyledString( + override val unstyled: String, + override val monospaceLength: Int +) : NotYetStyledString //TODO 1.3.0 KDOC //TODO 1.3.0 could we use this for HTML output? if so, then move this to theming @@ -16,101 +33,149 @@ interface StyledString { val noLineBreak: Boolean val horizontalAlignment: HorizontalAlignment - //TODO 1.3.0 find a better name, result is not clear at all of what - fun result(): String + /** + * Returns the length in terms of mono-width space. + * + * Wich means it is based on [unstyled] and foreground/background colour etc. is ignored. Moreover, it takes into + * account if a char is wider or less wide than 1 monospace char (e.g. surrogate chars or variant selectors don't + * take up any monospace). + * + * In the end it heavily depends on the font and the renderer how much space a certain char really takes + * (especially for emoji), so it is clear that this is only an approximation. + */ + val monospaceLength: Int + + /** + * Same as [monospaceLength] in case [noLineBreak] = true, otherwise the longest line length in terms of + * mono-width space. + */ + val maxLineMonospaceLength: Int fun withoutLineBreaks(): StyledString - fun appendUnstyled(unstyledString: String): StyledString fun withHorizontalAlignment(alignment: HorizontalAlignment): StyledString + /** + * Returns the resulting [String] for this [StyledString]. + * + * Taking into account that it [maybeStyled] and line breaks need to be replaced by spaced in case + * [noLineBreak] = true. + */ + fun getString(): String + fun padString(monospaceLength: Int): String = padMonospace(monospaceLength) + + companion object { - operator fun invoke( + + fun createWithPredefinedMonospaceLength( unstyled: String, maybeStyled: Option, + monospaceLength: Int, + maxLineMonospaceLength: Int = monospaceLength, noLineBreak: Boolean = true, horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT, - ): StyledString = DefaultStyledString( - unstyled = unstyled, - maybeStyled = maybeStyled, - noLineBreak = noLineBreak, - horizontalAlignment = horizontalAlignment, + ): StyledString = PrecalculatedMonospaceStyledString( + unstyled, + maybeStyled, + noLineBreak, + horizontalAlignment, + monospaceLength, + maxLineMonospaceLength ) - val EMPTY_STRING: StyledString = PredefinedNoStyleStyledString("", HorizontalAlignment.DEFAULT) - val COLON_SEPARATOR: StyledString = PredefinedNoStyleStyledString(" : ", HorizontalAlignment.CENTRE) + fun create( + monospaceLengthCalculator: MonospaceLengthCalculator, + unstyled: String, + maybeStyled: Option, + noLineBreak: Boolean = true, + horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT, + ): StyledString = CalculatedMonospaceStyledString( + monospaceLengthCalculator, + unstyled, + maybeStyled, + noLineBreak, + horizontalAlignment + ) + + val EMPTY_STRING: StyledString = PredefinedNoStyleNoLineBreakStyledString("", HorizontalAlignment.DEFAULT) + val COLON_SEPARATOR: StyledString = PredefinedNoStyleNoLineBreakStyledString(" : ", HorizontalAlignment.CENTRE) } } // TODO 1.3.0 KDOC -fun StyledString.replaceWrap(s: String) = +fun StyledString.replaceWrap(s: String): String = if (noLineBreak) s.replace('\n', ' ') else s // TODO 1.3.0 KDOC -fun StyledString.pad(length: Int): String = - maybeStyled.fold( - { - val txt = replaceWrap(unstyled) - when (horizontalAlignment) { - HorizontalAlignment.LEFT -> txt.padEnd(length) - HorizontalAlignment.CENTRE -> txt.padStart(length / 2 + ((length - txt.length) / 2)).padEnd(length) - HorizontalAlignment.RIGHT -> txt.padStart(length) - } - }, - { styled -> - // Note, if someone should define ansi colours in the unstyled string -- for instance - // `Text("\u001b[31mred\u001b[0m")` -- then the length is wrong, i.e. we don't handle/support this for now - val unstyledLength = unstyled.length - val styleDiff = styled.length - unstyledLength - val sb = StringBuilder(length + styleDiff) - val pad = length - unstyledLength - - when (horizontalAlignment) { - HorizontalAlignment.LEFT -> { - // no padding before - } - - HorizontalAlignment.CENTRE -> { - // pad half before - sb.appendSpaces(pad / 2) - } - - HorizontalAlignment.RIGHT -> { - // pad all before - sb.appendSpaces(pad) - } - } - - // append text as such - sb.append(replaceWrap(styled)) - - when (horizontalAlignment) { - HorizontalAlignment.LEFT -> { - // pad all after - sb.appendSpaces(pad) - } - - HorizontalAlignment.CENTRE -> { - // pad half after - sb.appendSpaces(pad - (pad / 2)) - } - - HorizontalAlignment.RIGHT -> { - // no padding after - } - } - - sb.toString() +fun StyledString.padMonospace(monospaceLength: Int): String { + val pad = monospaceLength - this.monospaceLength + if (pad <= 0) return getString() + + // the actual string might be longer than the monospacedLength of this StyledString, the capacity of the + // StringBuilder needs to be longer for that amount + val diff = maybeStyled.fold({ this.unstyled.length }, { styled -> styled.length }) - this.monospaceLength + val sb = StringBuilder(monospaceLength + diff) + + when (horizontalAlignment) { + HorizontalAlignment.LEFT -> { + // no padding before + } + + HorizontalAlignment.CENTRE -> { + // pad half before, if `pad` is odd, then we pad more on the right than on the left + sb.appendSpaces(pad / 2) } - ) + + HorizontalAlignment.RIGHT -> { + // pad all before + sb.appendSpaces(pad) + } + } + + // append text as such + sb.append(replaceWrap(maybeStyled.fold({ this.unstyled }, ::identity))) + + when (horizontalAlignment) { + HorizontalAlignment.LEFT -> { + // pad all after + sb.appendSpaces(pad) + } + + HorizontalAlignment.CENTRE -> { + // pad half after + sb.appendSpaces(pad - (pad / 2)) + } + + HorizontalAlignment.RIGHT -> { + // no padding after + } + } + + return sb.toString() +} // TODO 1.3.0 KDOC fun String.noStyle( + monospaceLengthCalculator: MonospaceLengthCalculator, noLineBreak: Boolean = true, - horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT + horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT, ): StyledString = if (this == "") StyledString.EMPTY_STRING - else StyledString(this, None, noLineBreak = noLineBreak, horizontalAlignment = horizontalAlignment) + else StyledString.create(monospaceLengthCalculator, this, None, noLineBreak, horizontalAlignment) + +fun String.noStyle( + monospaceLength: Int, + maxLineMonospaceLength: Int = monospaceLength, + noLineBreak: Boolean = true, + horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT +): StyledString = StyledString.createWithPredefinedMonospaceLength( + this, + maybeStyled = None, + monospaceLength = monospaceLength, + maxLineMonospaceLength = maxLineMonospaceLength, + noLineBreak = noLineBreak, + horizontalAlignment = horizontalAlignment +) // TODO 1.3.0 KDOC diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/TextStyler.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/TextStyler.kt index 3676e2de72..74d8aa3653 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/TextStyler.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/reporting/theming/text/TextStyler.kt @@ -3,28 +3,60 @@ package ch.tutteli.atrium.reporting.theming.text import ch.tutteli.atrium.core.Option import ch.tutteli.atrium.reporting.HorizontalAlignment + // TODO 1.3.0 KDOC interface TextStyler { + fun style( + monospaceLengthCalculator: MonospaceLengthCalculator, + unstyledString: String, + styleId: String, + noLineBreak: Boolean = true, + horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT, + ): StyledString + + /** + * + * @param spaceToAppend adds the given space after the styled string, i.e. the space will not be affected by the + * style. + * @param monospaceLength the monospace length of the StyledString including the [spaceToAppend] + * i.e. you can also add a space which has less than one monospace length or more, we are only interested on the + * total and this should always add up to an integer. + * @param maxLineMonospaceLength the monospace length of the longest line taking into account that a space will be + * added to the last line in case [spaceToAppend] is defined. + */ + fun styleWithPredefinedMonospaceLength( unstyledString: String, styleId: String, + monospaceLength: Int, + maxLineMonospaceLength: Int, + spaceToAppend: String = "", noLineBreak: Boolean = true, - horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT + horizontalAlignment: HorizontalAlignment = HorizontalAlignment.DEFAULT, ): StyledString } // TODO 1.3.0 KDOC -fun TextStyler.style(unstyledString: String, maybeStyle: Option