-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress deprecations, start to replace stuff
- Loading branch information
Showing
49 changed files
with
1,693 additions
and
1,490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
953 changes: 479 additions & 474 deletions
953
atrium-core/api/using-kotlin-1.9-or-newer/atrium-core.api
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
.../reporting/prerendering/text/impl/assertion/DefaultDescriptiveAssertionTextPreRenderer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...monTest/kotlin/ch/tutteli/atrium/assertions/builders/DescriptiveWithBasedOnSubjectSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...ore/src/commonTest/kotlin/ch/tutteli/atrium/reporting/AssertionFormatterControllerSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...e/src/commonTest/kotlin/ch/tutteli/atrium/reporting/TextFallbackAssertionFormatterSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...c/commonTest/kotlin/ch/tutteli/atrium/reporting/TextSummaryAssertionGroupFormatterSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...um-core/src/commonTest/kotlin/ch/tutteli/atrium/reporting/text/BulletPointProviderSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...src/commonTest/kotlin/ch/tutteli/atrium/reporting/translating/TranslatableWithArgsSpec.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
atrium-core/src/jsTest/kotlin/ch/tutteli/atrium/core/polyfills/KClassCastTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
atrium-core/src/jsTest/kotlin/ch/tutteli/atrium/core/polyfills/KClassFullNameTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
atrium-core/src/jsTest/kotlin/ch/tutteli/atrium/core/polyfills/testUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
bundles/fluent/atrium-fluent/src/commonTest/kotlin/AssertionSmokeTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
//TODO remove with 2.0.0 at the latest | ||
@file:Suppress("DEPRECATION") | ||
|
||
import ch.tutteli.atrium._coreAppend | ||
import ch.tutteli.atrium.api.fluent.en_GB.toEqual | ||
import ch.tutteli.atrium.api.verbs.expect | ||
import ch.tutteli.atrium.creating.Expect | ||
import ch.tutteli.atrium.creating.ProofContainer | ||
import ch.tutteli.atrium.creating.proofs.Proof | ||
import ch.tutteli.atrium.creating.proofs.builders.buildSimpleProof | ||
import ch.tutteli.atrium.logic._logic | ||
import ch.tutteli.atrium.logic.createDescriptiveAssertion | ||
import ch.tutteli.atrium.reporting.Text | ||
import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable | ||
import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE | ||
import kotlin.test.Test | ||
|
||
//TODO 1.3.0 SmokeTest with Proof | ||
class AssertionSmokeTest { | ||
|
||
@Test | ||
fun toEqual_canBeUsed() { | ||
expect(1).toEqual(1) | ||
} | ||
|
||
@Test | ||
fun expectationFunctionWithoutI18nCanBeUsed() { | ||
expect(2).toBeEvenDeprecated() | ||
expect(1).toBeOddDeprecated() | ||
} | ||
|
||
@Test | ||
fun expectationFunctionWithI18nCanBeUsed() { | ||
expect(4).toBeAMultipleOfDeprecated(2) | ||
} | ||
|
||
} | ||
|
||
fun Expect<Int>.toBeEvenDeprecated() = | ||
_logic.append(_logic.createDescriptiveAssertion(TO_BE, Text("an even number")) { it % 2 == 0 }) | ||
|
||
fun Expect<Int>.toBeOddDeprecated() = | ||
_logic.append(_logic.createDescriptiveAssertion(TO_BE, Text("an odd number")) { it % 2 == 1}) | ||
|
||
fun Expect<Int>.toBeAMultipleOfDeprecated(base: Int): Expect<Int> = _coreAppend { toBeAMultipleOfDeprecated(base) } | ||
|
||
private fun ProofContainer<Int>.toBeAMultipleOfDeprecated(base: Int): Proof = | ||
buildSimpleProof(DescriptionIntAssertions.TO_BE_MULTIPLE_OF, base) { it % base == 0 } | ||
|
||
enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { | ||
TO_BE_MULTIPLE_OF("to be multiple of") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.