|
| 1 | +package aPackage |
| 2 | +import spock.lang.* |
| 3 | + |
| 4 | +class ASpec extends Specification { |
| 5 | + def "aFeature"() { |
| 6 | +/*--------- tag::snapshot[] ---------*/ |
| 7 | +public void $spock_feature_0_0(java.lang.Object a, java.lang.Object b, java.lang.Object result) { |
| 8 | + org.spockframework.runtime.ErrorCollector $spock_errorCollector = org.spockframework.runtime.ErrorRethrower.INSTANCE |
| 9 | + org.spockframework.runtime.ValueRecorder $spock_valueRecorder = new org.spockframework.runtime.ValueRecorder() |
| 10 | + org.spockframework.runtime.SpockRuntime.callBlockEntered(this, 0) |
| 11 | + try { |
| 12 | + org.spockframework.runtime.SpockRuntime.verifyCondition($spock_errorCollector, $spock_valueRecorder.reset(), 'a + b == result', 2, 9, null, $spock_valueRecorder.record($spock_valueRecorder.startRecordingValue(4), $spock_valueRecorder.record($spock_valueRecorder.startRecordingValue(2), $spock_valueRecorder.record($spock_valueRecorder.startRecordingValue(0), a) + $spock_valueRecorder.record($spock_valueRecorder.startRecordingValue(1), b)) == $spock_valueRecorder.record($spock_valueRecorder.startRecordingValue(3), result))) |
| 13 | + } |
| 14 | + catch (java.lang.Throwable $spock_condition_throwable) { |
| 15 | + org.spockframework.runtime.SpockRuntime.conditionFailedWithException($spock_errorCollector, $spock_valueRecorder, 'a + b == result', 2, 9, null, $spock_condition_throwable)} |
| 16 | + finally { |
| 17 | + } |
| 18 | + org.spockframework.runtime.SpockRuntime.callBlockExited(this, 0) |
| 19 | + this.getSpecificationContext().getMockController().leaveScope() |
| 20 | +} |
| 21 | + |
| 22 | +public java.lang.Object $spock_feature_0_0prov0() { |
| 23 | + return [1, 3] |
| 24 | +} |
| 25 | + |
| 26 | +public java.lang.Object $spock_feature_0_0prov1(java.util.List $spock_p_a) { |
| 27 | + return [2, 4] |
| 28 | +} |
| 29 | + |
| 30 | +public java.lang.Object $spock_feature_0_0prov2(java.util.List $spock_p_a, java.util.List $spock_p_b) { |
| 31 | + return [{ -> |
| 32 | + java.lang.Object a = $spock_p_a.get(0) |
| 33 | + java.lang.Object b = $spock_p_b.get(0) |
| 34 | + return a + b |
| 35 | + }.call(), { -> |
| 36 | + java.lang.Object a = $spock_p_a.get(1) |
| 37 | + return a + a |
| 38 | + }.call()] |
| 39 | +} |
| 40 | + |
| 41 | +public java.lang.Object $spock_feature_0_0proc(java.lang.Object $spock_p0, java.lang.Object $spock_p1, java.lang.Object $spock_p2) { |
| 42 | + java.lang.Object a = (( $spock_p0 ) as java.lang.Object) |
| 43 | + java.lang.Object b = (( $spock_p1 ) as java.lang.Object) |
| 44 | + java.lang.Object result = (( $spock_p2 ) as java.lang.Object) |
| 45 | + return new java.lang.Object[]{ a , b , result } |
| 46 | +} |
| 47 | +/*--------- end::snapshot[] ---------*/ |
| 48 | + } |
| 49 | +} |
0 commit comments