3939import org .junit .jupiter .api .Test ;
4040import org .scijava .collections .ObjectArray ;
4141import org .scijava .function .Computers ;
42+ import org .scijava .function .Inplaces ;
4243import org .scijava .ops .api .Hints ;
4344import org .scijava .ops .engine .AbstractTestEnvironment ;
4445import org .scijava .ops .engine .matcher .impl .OpClassInfo ;
@@ -119,6 +120,12 @@ public void testSimplifiedOpFromEnvironment() {
119120 out .addAll (in );
120121 };
121122
123+ @ OpField (names = "test.coalesceSimpleDescription" )
124+ public final Inplaces .Arity2_1 <List <Long >, Long > inplace1 = (in1 , in2 ) -> {
125+ in1 .clear ();
126+ in1 .add (in2 );
127+ };
128+
122129 @ Test
123130 public void testSimpleDescriptions () {
124131 String actual = ops .unary ("test.coalesceSimpleDescription" ).helpVerbose ();
@@ -137,7 +144,14 @@ public void testSimpleDescriptions() {
137144 expected = //
138145 "test.coalesceSimpleDescription:\n \t - (input1, @CONTAINER container1) -> None\n \t - (input1) -> Number" ;
139146 Assertions .assertEquals (expected , actual );
140- // Finally test that different number of outputs doesn't retrieve the Ops
147+
148+ // Test that with 2 inputs we do get the binary inplace Op, but no others
149+ actual = ops .binary ("test.coalesceSimpleDescription" ).help ();
150+ expected = //
151+ "test.coalesceSimpleDescription:\n \t - (@MUTABLE mutable1, input1) -> None" ;
152+ Assertions .assertEquals (expected , actual );
153+
154+ // Finally test that with no inputs we don't get any of the Ops
141155 actual = ops .nullary ("test.coalesceSimpleDescription" ).help ();
142156 expected = "No Ops found matching this request." ;
143157 Assertions .assertEquals (expected , actual );
0 commit comments