GoEddie / SQLCover

Apache License 2.0
63 stars 52 forks source link

Filter out effectless statements #87

Open pguyot opened 1 year ago

pguyot commented 1 year ago

Filter out statement that do not modify any row while they should have. Rationale is these statements are not properly tested, most likely because the condition is false.

How to test this code:

create procedure test_cover as
begin
    create table #t (x int, y int)
    insert into #t values (1, 1)
    update #t set x = 0 where y = 0
    select * from #t
end
go

Update statement will be marked as not executed.

Has been tested on (remove any that don't apply):