tezos-checker / checker

An in-development "robocoin" system for the Tezos blockchain
24 stars 16 forks source link

Add additional unit tests for burrow logic #185

Closed dorranh closed 3 years ago

dorranh commented 3 years ago

This PR adds a variety of unit tests to testBurrow.ml which address missing test cases found during mutation testing:

SRC                  TYPE                 MUTATION_FROM   -> MUTATION_TO     LINE 
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> -1              L365  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 1_000_001       L365  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 999_999         L372  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> -1              L372  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 1               L372  

src/burrow.ml        INTEGER_LITERAL      0mutez          -> 1mutez          L210  

src/burrow.ml        INTEGER_LITERAL      0               -> -1              L538  
src/burrow.ml        SWAP_FUNCTION        gt_int_int      -> leq_int_int     L538  
src/burrow.ml        INTEGER_LITERAL      0               -> 1               L538  
src/burrow.ml        SWAP_FUNCTION        gt_int_int      -> eq_int_int      L538  

src/burrow.ml        SWAP_FUNCTION        add_int_int     -> div_int_int     L353
src/burrow.ml        SWAP_FUNCTION        add_int_int     -> mul_int_int     L353
src/burrow.ml        SWAP_FUNCTION        add_int_int     -> sub_int_int     L353  

src/burrow.ml        SWAP_FUNCTION        sub_int_int     -> div_int_int     L331  
src/burrow.ml        SWAP_FUNCTION        sub_int_int     -> mul_int_int     L337  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 999_999         L339  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> -1              L339  

src/burrow.ml        INTEGER_LITERAL      0mutez          -> 1mutez          L104  

src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 1               L438  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 0               L438  

src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 1               L409  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 999_999         L409  
src/burrow.ml        INTEGER_LITERAL      1_000_000       -> 0               L409