Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.

Clean ProvenanceTest - #56

Merged
ctrueden merged 4 commits into
mainfrom
scijava/scijava-ops-engine/clean-provenance-test
Jul 2, 2022
Merged

ctrueden merged 4 commits into
mainfrom
scijava/scijava-ops-engine/clean-provenance-test

Conversation

@gselzer

@gselzer gselzer commented Jan 21, 2022

Copy link
Copy Markdown
Member

This PR is focused on two actions, both in ProvenanceTest.

Firstly, it makes better assertions in the tests dealing with Op creation from a String signature. See scijava/scijava#83 for the motivation behind this.

Secondly, it cleans and formats the file.

Closes scijava/scijava#83

@ctrueden
ctrueden force-pushed the scijava/scijava-ops-engine/clean-provenance-test branch 2 times, most recently from 75a6068 to 7475c2b Compare July 1, 2022 22:11
gselzer added 4 commits July 1, 2022 17:22
The things that we needed in SciJava Ops API were better suited to live
in the classes that used them. With those things moved, there was no
reason to keep OpUtils in SciJava Ops API.
@ctrueden
ctrueden force-pushed the scijava/scijava-ops-engine/clean-provenance-test branch from 7475c2b to d4fb9c9 Compare July 1, 2022 22:24

@ctrueden ctrueden left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed a couple of small post-rebase problems, and this should be good to go now! Just waiting for CI to give us the green checkmark first.

import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.*;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since when did we decide to start using wildcard imports? I don't remember discussing this.


/** Gets the op's input parameters. */
default List<Member<?>> inputs() {
return OpUtils.inputs(struct());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-move, does anything still use OpUtils.inputs to obtain the members of a struct? Or can we slim down the OpUtils methods henceforth? It's not in an exported anymore, right? So we could trim it?

Function<Double, Thing> actual = ops //
.opFromSignature(signature, specialType);
// Assert Op similarity
Assertions.assertTrue(wrappedOpEquality(mapper, actual));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been wondering... we used to use import static with JUnit 4. Now that we are on JUnit 5, would it make sense to do the same, statically importing used Assertions methods? Or do you prefer the verbosity this way? It's more consistent with everything else, but I ask because it's a break from previous JUnit convention.

@ctrueden
ctrueden merged commit 3c5837c into main Jul 2, 2022
@ctrueden
ctrueden deleted the scijava/scijava-ops-engine/clean-provenance-test branch July 2, 2022 02:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProvenanceTest: assert that matched ops actually match

2 participants