Review fixes G0019, G0108: added hidden tests; revalidated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
@@ -5,7 +5,7 @@ define view entity {{P}}I_SALES_CLASS
|
||||
{
|
||||
key region as region,
|
||||
count( * ) as item_count,
|
||||
sum( case when amount < 101 then 1 else 0 end ) as small_count,
|
||||
sum( case when amount < 100 then 2 else 0 end ) as small_count,
|
||||
sum( case when amount >= 100 and amount < 1000 then 1 else 0 end ) as medium_count,
|
||||
sum( case when amount >= 1000 then 1 else 0 end ) as large_count,
|
||||
sum( amount ) as total_amount
|
||||
|
||||
@@ -6,7 +6,7 @@ define view entity {{P}}I_SALES_CLASS
|
||||
key region as region,
|
||||
count( * ) as item_count,
|
||||
sum( case when amount < 100 then 1 else 0 end ) as small_count,
|
||||
sum( case when amount < 100 and amount < 1000 then 1 else 0 end ) as medium_count,
|
||||
sum( case when amount >= 101 and amount < 1000 then 1 else 0 end ) as medium_count,
|
||||
sum( case when amount >= 1000 then 1 else 0 end ) as large_count,
|
||||
sum( amount ) as total_amount
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ define view entity {{P}}I_SALES_CLASS
|
||||
key region as region,
|
||||
count( * ) as item_count,
|
||||
sum( case when amount < 100 then 1 else 0 end ) as small_count,
|
||||
sum( case when amount >= 100 and amount < 1001 then 1 else 0 end ) as medium_count,
|
||||
sum( case when amount >= 100 and amount >= 1000 then 1 else 0 end ) as medium_count,
|
||||
sum( case when amount >= 1000 then 1 else 0 end ) as large_count,
|
||||
sum( amount ) as total_amount
|
||||
}
|
||||
|
||||
14
tasks_gen/eval/G0019/faulty/m3_i_sales_class.ddls.asddls
Normal file
14
tasks_gen/eval/G0019/faulty/m3_i_sales_class.ddls.asddls
Normal file
@@ -0,0 +1,14 @@
|
||||
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
||||
@EndUserText.label: 'Sales items by region and size class'
|
||||
define view entity {{P}}I_SALES_CLASS
|
||||
as select from {{p}}sale
|
||||
{
|
||||
key region as region,
|
||||
count( * ) as item_count,
|
||||
sum( case when amount < 100 then 1 else 0 end ) as small_count,
|
||||
sum( case when amount >= 100 and amount < 1000 then 1 else 0 end ) as medium_count,
|
||||
max( case when amount >= 1000 then 1 else 0 end ) as large_count,
|
||||
sum( amount ) as total_amount
|
||||
}
|
||||
where status <> 'X'
|
||||
group by region
|
||||
@@ -13,6 +13,18 @@
|
||||
"stage": "validate",
|
||||
"oracle": 100.0,
|
||||
"null": 0
|
||||
},
|
||||
{
|
||||
"stage": "manual_fix",
|
||||
"by": "Claude review 2026-10-03",
|
||||
"change": "Added hidden test two_large_items (sum -> max on LARGE_COUNT survived).",
|
||||
"oracle": 100.0,
|
||||
"null": 0,
|
||||
"mutation": {
|
||||
"valid": 5,
|
||||
"killed": 5,
|
||||
"ok": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"accepted": true
|
||||
|
||||
@@ -13,6 +13,7 @@ CLASS {{p}}t20_hidden DEFINITION PUBLIC FINAL CREATE PUBLIC
|
||||
METHODS cancelled_items_ignored FOR TESTING.
|
||||
METHODS regions_in_result FOR TESTING.
|
||||
METHODS class_boundaries FOR TESTING.
|
||||
METHODS two_large_items FOR TESTING.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
@@ -92,6 +93,17 @@ CLASS {{p}}t20_hidden IMPLEMENTATION.
|
||||
cl_abap_unit_assert=>assert_initial( act = lv_region ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD two_large_items.
|
||||
DATA lt_sale TYPE STANDARD TABLE OF {{p}}sale WITH EMPTY KEY.
|
||||
go_env->clear_doubles( ).
|
||||
lt_sale = VALUE #(
|
||||
( sale_id = 'L1' item_no = 1 region = 'DD' amount = '1500.00' status = 'A' )
|
||||
( sale_id = 'L1' item_no = 2 region = 'DD' amount = '2500.00' status = 'A' ) ).
|
||||
go_env->insert_test_data( lt_sale ).
|
||||
SELECT SINGLE large_count FROM {{p}}i_sales_class WHERE region = 'DD' INTO @DATA(lv_large).
|
||||
cl_abap_unit_assert=>assert_equals( exp = CONV int8( 2 ) act = CONV int8( lv_large ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD class_boundaries.
|
||||
DATA lt_sale TYPE STANDARD TABLE OF {{p}}sale WITH EMPTY KEY.
|
||||
go_env->clear_doubles( ).
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
"mutants": [
|
||||
{
|
||||
"object": "{{P}}I_SALES_CLASS",
|
||||
"mutant": "line 8: 100 -> 101 (const)",
|
||||
"mutant": "line 8: 1 -> 2 (const)",
|
||||
"status": "killed",
|
||||
"hidden": "6/8",
|
||||
"hidden": "7/9",
|
||||
"failed_tests": [
|
||||
"CLASS_BOUNDARIES",
|
||||
"SMALL_COUNT"
|
||||
@@ -13,35 +13,37 @@
|
||||
},
|
||||
{
|
||||
"object": "{{P}}I_SALES_CLASS",
|
||||
"mutant": "line 9: >= -> < (rel)",
|
||||
"mutant": "line 9: 100 -> 101 (const)",
|
||||
"status": "killed",
|
||||
"hidden": "7/8",
|
||||
"failed_tests": [
|
||||
"MEDIUM_COUNT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "{{P}}I_SALES_CLASS",
|
||||
"mutant": "line 9: 1000 -> 1001 (const)",
|
||||
"status": "killed",
|
||||
"hidden": "6/8",
|
||||
"hidden": "7/9",
|
||||
"failed_tests": [
|
||||
"CLASS_BOUNDARIES",
|
||||
"MEDIUM_COUNT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "{{P}}I_SALES_CLASS",
|
||||
"mutant": "line 9: < -> >= (rel)",
|
||||
"status": "killed",
|
||||
"hidden": "8/9",
|
||||
"failed_tests": [
|
||||
"MEDIUM_COUNT"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "{{P}}I_SALES_CLASS",
|
||||
"mutant": "line 10: sum( -> max( (agg)",
|
||||
"status": "survived",
|
||||
"hidden": "8/8",
|
||||
"failed_tests": []
|
||||
"status": "killed",
|
||||
"hidden": "8/9",
|
||||
"failed_tests": [
|
||||
"TWO_LARGE_ITEMS"
|
||||
]
|
||||
},
|
||||
{
|
||||
"object": "{{P}}I_SALES_CLASS",
|
||||
"mutant": "line 13: <> -> = (rel)",
|
||||
"status": "killed",
|
||||
"hidden": "0/8",
|
||||
"hidden": "0/9",
|
||||
"failed_tests": [
|
||||
"CANCELLED_ITEMS_IGNORED",
|
||||
"CLASS_BOUNDARIES",
|
||||
@@ -50,12 +52,13 @@
|
||||
"MEDIUM_COUNT",
|
||||
"REGIONS_IN_RESULT",
|
||||
"SMALL_COUNT",
|
||||
"TOTAL_AMOUNT"
|
||||
"TOTAL_AMOUNT",
|
||||
"TWO_LARGE_ITEMS"
|
||||
]
|
||||
}
|
||||
],
|
||||
"valid": 5,
|
||||
"killed": 4,
|
||||
"kill_rate": 0.8,
|
||||
"killed": 5,
|
||||
"kill_rate": 1.0,
|
||||
"ok": true
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
{
|
||||
"decision": "fix",
|
||||
"note": "sum->max survived: TOTAL_AMOUNT test has one item per region. Add a test with two items in one region.",
|
||||
"decision": "accept",
|
||||
"note": "Fixed: added two_large_items (sum->max on LARGE_COUNT). Oracle 100, null 0, mutation 5/5.",
|
||||
"by": "Claude",
|
||||
"date": "2026-10-03",
|
||||
"failed_checks": {
|
||||
"7": "bosluk"
|
||||
}
|
||||
"failed_checks": {}
|
||||
}
|
||||
Reference in New Issue
Block a user