Hard batch G0022-G0026: 5/5 accepted; budget floor, CDS checks, mutation check
- generator: budget floor (2x oracle activations, 3x calls), static checks for CDS $parameters and UNION annotation - harness/mutation.py: deterministic mutants of the reference; hidden tests must fail - G0022 revalidated with harness fixes: oracle 100, null 0 - results in docs/faz1-tasarim.md 11f Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
45
tasks_gen/eval/G0025/reference/t16_test.clas.abap
Normal file
45
tasks_gen/eval/G0025/reference/t16_test.clas.abap
Normal file
@@ -0,0 +1,45 @@
|
||||
CLASS {{p}}t16_test DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
CLASS-DATA go_env TYPE REF TO if_cds_test_environment.
|
||||
CLASS-METHODS class_setup.
|
||||
CLASS-METHODS class_teardown.
|
||||
METHODS setup.
|
||||
METHODS both_sources FOR TESTING.
|
||||
METHODS same_partner_twice FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}t16_test IMPLEMENTATION.
|
||||
METHOD class_setup.
|
||||
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_PARTNER_ALL' ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD class_teardown.
|
||||
go_env->destroy( ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD setup.
|
||||
DATA lt_a TYPE STANDARD TABLE OF {{p}}part_a WITH EMPTY KEY.
|
||||
DATA lt_b TYPE STANDARD TABLE OF {{p}}part_b WITH EMPTY KEY.
|
||||
go_env->clear_doubles( ).
|
||||
lt_a = VALUE #( ( partner_id = 'A1' name = 'One' city = 'Bonn' ) ).
|
||||
lt_b = VALUE #( ( partner_id = 'A1' name = 'One' city = 'Bonn' )
|
||||
( partner_id = 'B1' name = 'Two' city = 'Kiel' ) ).
|
||||
go_env->insert_test_data( lt_a ).
|
||||
go_env->insert_test_data( lt_b ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD both_sources.
|
||||
SELECT source FROM {{p}}i_partner_all ORDER BY source INTO TABLE @DATA(lt_rows).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 3 act = lines( lt_rows ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD same_partner_twice.
|
||||
SELECT source FROM {{p}}i_partner_all
|
||||
WHERE partner_id = 'A1' ORDER BY source INTO TABLE @DATA(lt_rows).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 2 act = lines( lt_rows ) ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 'A' act = lt_rows[ 1 ]-source ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = 'B' act = lt_rows[ 2 ]-source ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user