Skip to content

Commit

Permalink
update TODOs which we do no longer plan for 0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robstoll committed Apr 4, 2021
1 parent 8210983 commit 180e0cc
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ch.tutteli.atrium.logic.collectForCompositionBasedOnSubject
/**
* Collects the assertions [assertionCreator] creates and uses them as [AssertionGroup.assertions].
*
* //TODO 0.17.0 in case we somehow incorporate the current container in AssertionsOptions, then remove container as parameter
* //TODO 0.18.0 in case we somehow incorporate the current container in AssertionsOptions, then remove container as parameter
*/
fun <T, G : ExplanatoryAssertionGroupType, R> AssertionsOption<G, R>.collectAssertions(
container: AssertionContainer<*>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class InAnyOrderEntriesAssertionCreator<E : Any, T : IterableLike>(
return group to count
}

//TODO 0.17.0 check if this is still state of the art to add a hint that no assertion was created
//TODO 0.18.0 check if this is still state of the art to add a hint that no assertion was created
// in the assertionCreator-lambda, maybe it is a special case and needs to be handled like this,
// maybe it would be enough to collect
@Suppress("DEPRECATION" /* OptIn is only available since 1.3.70 which we cannot use if we want to support 1.2 */)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class InOrderOnlyBaseAssertionCreator<E, T : IterableLike, SC>(
searchCriteria: List<SC>
): AssertionGroup {
return LazyThreadUnsafeAssertionGroup {
// TODO 0.17.0 more efficient and pragmatic than turnSubjectToList, use at other places too
// TODO 0.18.0 more efficient and pragmatic than turnSubjectToList, use at other places too
val maybeList = container.maybeSubject.map {
//TODO move into when with 1.0.0, update to Kotlin 1.4 respectively
val iterable = converter(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface InOrderOnlyMatcher<E, SC> {
}
val elementAssertion = elementAssertionCreator(maybeElement, searchCriterion)
val assertion = maybeElement.map { elementAssertion }.getOrElse {
//TODO 0.17.0: extract common pattern
//TODO 0.18.0: extract common pattern
maybeSubject.fold({
// already in an explanatory assertion context, no need to wrap it again
elementAssertion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DefaultFeatureExtractor : FeatureExtractor {
val subAssertions = maybeSubAssertions.fold({
listOf<Assertion>()
}) { assertionCreator ->
// TODO 0.17.0: factor out in common pattern, should not be the concern of the average expectation
// TODO 0.18.0: factor out in common pattern, should not be the concern of the average expectation
// function writer
container.maybeSubject.fold({
// already in an explanatory assertion group, no need to wrap again
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DefaultThrowableAssertions : ThrowableAssertions {
expectedType: KClass<TExpected>
): SubjectChangerBuilder.ExecutionStep<Throwable?, TExpected> =
container.manualFeature(OCCURRED_EXCEPTION_CAUSE) { cause }.transform().let { previousExpect ->
//TODO 0.17.0 factor out a pattern, we are doing this more than once, in API we have withOptions
//TODO 0.18.0 factor out a pattern, we are doing this more than once, in API we have withOptions
FeatureExpect(
previousExpect,
FeatureExpectOptions(representationInsteadOfFeature = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal fun <E : Any> createExplanatoryAssertionGroup(
return assertionBuilder.explanatoryGroup
.withDefaultType
.let {
//TODO 0.17.0 looks a lot like toBeNullIfNullGiven
//TODO 0.18.0 looks a lot like toBeNullIfNullGiven
if (assertionCreatorOrNull != null) {
// we don't use a subject, we will not show it anyway
it.collectAssertions(container, None, assertionCreatorOrNull)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ abstract class MapContainsInOrderOnlyKeyValueExpectationsSpec(
}.toThrow<AssertionError> {
message {
containsInOrderOnlyDescr()
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
//containsSize(0, 1)
elementOutOfBound(0, "a", "$toBeDescr: 1")
}
Expand All @@ -160,7 +160,7 @@ abstract class MapContainsInOrderOnlyKeyValueExpectationsSpec(
}.toThrow<AssertionError> {
message {
containsInOrderOnlyDescr()
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
//containsSize(0, 3)
elementOutOfBound(0, "a", "$lessThanDescr: 1")
elementOutOfBound(1, "b", "$toBeDescr: 3")
Expand Down Expand Up @@ -198,7 +198,7 @@ abstract class MapContainsInOrderOnlyKeyValueExpectationsSpec(
message {
elementSuccess(0, "a=1", "a", "$toBeDescr: 1")
additionalEntries(1 to "b=2")
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsSize(2, 1)
}
}
Expand All @@ -215,7 +215,7 @@ abstract class MapContainsInOrderOnlyKeyValueExpectationsSpec(
elementFailing(0, "a=1", "b", "$toBeDescr: 2")
elementFailing(1, "b=2", "a", "$toBeDescr: 1")

// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsNot(sizeDescr)
containsNot(additionalEntriesDescr)
}
Expand Down Expand Up @@ -275,7 +275,7 @@ abstract class MapContainsInOrderOnlyKeyValueExpectationsSpec(
message {
elementSuccess(0, "a=null", "a", "$toBeDescr: null")
additionalEntries(1 to "null=1", 2 to "b=2")
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsSize(3, 1)
}
}
Expand All @@ -296,7 +296,7 @@ abstract class MapContainsInOrderOnlyKeyValueExpectationsSpec(
elementFailing(1, "null=1", "a", "$toBeDescr: null")
elementFailing(2, "b=2", null, "$toBeDescr: 1")

// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsNot(sizeDescr)
containsNot(additionalEntriesDescr)

Expand All @@ -319,7 +319,7 @@ abstract class MapContainsInOrderOnlyKeyValueExpectationsSpec(
elementFailing(1, "null=1", "c", "$lessThanDescr: 1")
elementFailing(2, "b=2", "b", "$lessThanDescr: 2")

// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsNot(sizeDescr)
containsNot(additionalEntriesDescr)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ abstract class MapContainsInOrderOnlyKeyValuePairsExpectationsSpec(
}.toThrow<AssertionError> {
message {
containsInOrderOnlyDescr()
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
//containsSize(0, 1)
elementOutOfBound(0, "a", 1)
}
Expand All @@ -119,7 +119,7 @@ abstract class MapContainsInOrderOnlyKeyValuePairsExpectationsSpec(
}.toThrow<AssertionError> {
message {
containsInOrderOnlyDescr()
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
//containsSize(0, 3)
elementOutOfBound(0, "a", 2)
elementOutOfBound(1, "b", 3)
Expand Down Expand Up @@ -149,7 +149,7 @@ abstract class MapContainsInOrderOnlyKeyValuePairsExpectationsSpec(
message {
elementSuccess(0, "a=1", "a", 1)
additionalEntries(1 to "b=2")
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsSize(2, 1)
}
}
Expand All @@ -163,7 +163,7 @@ abstract class MapContainsInOrderOnlyKeyValuePairsExpectationsSpec(
elementFailing(0, "a=1", "b", 2)
elementFailing(1, "b=2", "a", 1)

// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsNot(sizeDescr)
containsNot(additionalEntriesDescr)
}
Expand Down Expand Up @@ -206,7 +206,7 @@ abstract class MapContainsInOrderOnlyKeyValuePairsExpectationsSpec(
message {
elementSuccess(0, "a=null", "a", null)
additionalEntries(1 to "null=1", 2 to "b=2")
// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsSize(3, 1)
}
}
Expand All @@ -221,7 +221,7 @@ abstract class MapContainsInOrderOnlyKeyValuePairsExpectationsSpec(
elementFailing(1, "null=1", "a", null)
elementFailing(2, "b=2", null, 1)

// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsNot(sizeDescr)
containsNot(additionalEntriesDescr)

Expand All @@ -239,7 +239,7 @@ abstract class MapContainsInOrderOnlyKeyValuePairsExpectationsSpec(
elementFailing(1, "null=1", "c", 3)
elementFailing(2, "b=2", "b", 3)

// TODO 0.17.0 wait for size to be moved out of Iterable.contains
// TODO 0.18.0 wait for size to be moved out of Iterable.contains
// containsNot(sizeDescr)
containsNot(additionalEntriesDescr)
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {

val allTargets = listOf("common", "jvm", "js")
val commonJvm = listOf("common", "jvm")
//TODO 0.17.0 or 0.18.0 change to allTargets and remove commonJvm once we have transitioned everything to the new MPP plugin
//TODO 0.18.0 or 0.18.0 change to allTargets and remove commonJvm once we have transitioned everything to the new MPP plugin
val allApisAllTargets = listOf("fluent-en_GB" to commonJvm, "infix-en_GB" to commonJvm)

val bcConfigs = listOf(
Expand Down

0 comments on commit 180e0cc

Please sign in to comment.