From f8377b7ff5d943fd0b3232f7aa8db281e54059d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=B6lfchen?= <115360611+W-lfchen@users.noreply.github.com> Date: Thu, 16 Mar 2023 23:56:37 +0100 Subject: [PATCH] Fix error messages (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Städing --- .../FlatteningTransformingSequenceGenericAssertions.java | 2 +- .../operation/TransformingSequenceGenericAssertions.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graderPublic/java/h09/sequence/operation/FlatteningTransformingSequenceGenericAssertions.java b/src/graderPublic/java/h09/sequence/operation/FlatteningTransformingSequenceGenericAssertions.java index 451d01d..5529adb 100644 --- a/src/graderPublic/java/h09/sequence/operation/FlatteningTransformingSequenceGenericAssertions.java +++ b/src/graderPublic/java/h09/sequence/operation/FlatteningTransformingSequenceGenericAssertions.java @@ -32,7 +32,7 @@ static void checkFields(final boolean strict) { "FlatteningTransformingSequence should have a field who's raw type is type Sequence")); final Field functionField = Stream.of(fields).filter(field -> field.getType().equals(Function.class)).findAny() .orElseThrow(() -> new AssertionError( - "FlatteningTransformingSequence should have a field who's raw type is type Sequence")); + "FlatteningTransformingSequence should have a field who's raw type is type Function")); VarianceTestExtensions.assertVariance(sequenceField.getGenericType(), strict, new VarianceNode(genericT, Variance.COVARIANT)); diff --git a/src/graderPublic/java/h09/sequence/operation/TransformingSequenceGenericAssertions.java b/src/graderPublic/java/h09/sequence/operation/TransformingSequenceGenericAssertions.java index a354c73..2f16ce3 100644 --- a/src/graderPublic/java/h09/sequence/operation/TransformingSequenceGenericAssertions.java +++ b/src/graderPublic/java/h09/sequence/operation/TransformingSequenceGenericAssertions.java @@ -34,7 +34,7 @@ public static void checkSignature(final boolean strict) { final Field sequenceField = Stream.of(fields).filter(field -> field.getType().equals(Sequence.class)).findAny() .orElseThrow(() -> new AssertionError("TransformingSequence should have a field who's raw type is type Sequence")); final Field functionField = Stream.of(fields).filter(field -> field.getType().equals(Function.class)).findAny() - .orElseThrow(() -> new AssertionError("TransformingSequence should have a field who's raw type is type Sequence")); + .orElseThrow(() -> new AssertionError("TransformingSequence should have a field who's raw type is type Function")); VarianceTestExtensions.assertVariance(sequenceField.getGenericType(), strict, new VarianceNode(genericT, Variance.COVARIANT));