Step F first pass: 81/92 accepted; budget floor 60 calls; rejected slots moved for regeneration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
74
tasks_gen/eval/G0143/reference/t14_test.clas.abap
Normal file
74
tasks_gen/eval/G0143/reference/t14_test.clas.abap
Normal file
@@ -0,0 +1,74 @@
|
||||
CLASS {{p}}t14_test DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
|
||||
PRIVATE SECTION.
|
||||
METHODS weekday_fee FOR TESTING.
|
||||
METHODS weekend_fee FOR TESTING.
|
||||
METHODS group_fee FOR TESTING.
|
||||
METHODS invalid_input FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
CLASS {{p}}t14_test IMPLEMENTATION.
|
||||
METHOD weekday_fee.
|
||||
DATA lv_fee TYPE decfloat34.
|
||||
CALL FUNCTION '{{P}}BOWL_FEE_OLD'
|
||||
EXPORTING
|
||||
iv_players = 1
|
||||
iv_games = 1
|
||||
iv_day = 1
|
||||
IMPORTING
|
||||
ev_fee = lv_fee
|
||||
EXCEPTIONS
|
||||
invalid_input = 1
|
||||
OTHERS = 2.
|
||||
cl_abap_unit_assert=>assert_subrc( exp = 0 ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '3.50' ) act = lv_fee ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD weekend_fee.
|
||||
DATA lv_fee TYPE decfloat34.
|
||||
CALL FUNCTION '{{P}}BOWL_FEE_OLD'
|
||||
EXPORTING
|
||||
iv_players = 6
|
||||
iv_games = 2
|
||||
iv_day = 6
|
||||
IMPORTING
|
||||
ev_fee = lv_fee
|
||||
EXCEPTIONS
|
||||
invalid_input = 1
|
||||
OTHERS = 2.
|
||||
cl_abap_unit_assert=>assert_subrc( exp = 0 ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '10.00' ) act = lv_fee ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD group_fee.
|
||||
DATA lv_fee TYPE decfloat34.
|
||||
CALL FUNCTION '{{P}}BOWL_FEE_OLD'
|
||||
EXPORTING
|
||||
iv_players = 12
|
||||
iv_games = 1
|
||||
iv_day = 1
|
||||
iv_shoes = abap_true
|
||||
IMPORTING
|
||||
ev_fee = lv_fee
|
||||
EXCEPTIONS
|
||||
invalid_input = 1
|
||||
OTHERS = 2.
|
||||
cl_abap_unit_assert=>assert_subrc( exp = 0 ).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV decfloat34( '21.00' ) act = lv_fee ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD invalid_input.
|
||||
DATA lv_fee TYPE decfloat34.
|
||||
CALL FUNCTION '{{P}}BOWL_FEE_OLD'
|
||||
EXPORTING
|
||||
iv_players = 0
|
||||
iv_games = 1
|
||||
iv_day = 1
|
||||
IMPORTING
|
||||
ev_fee = lv_fee
|
||||
EXCEPTIONS
|
||||
invalid_input = 1
|
||||
OTHERS = 2.
|
||||
cl_abap_unit_assert=>assert_equals( exp = 1 act = sy-subrc ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user