Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test living vertigo mutations #98

Open
Rubilmax opened this issue Nov 23, 2023 · 1 comment
Open

Test living vertigo mutations #98

Rubilmax opened this issue Nov 23, 2023 · 1 comment
Labels

Comments

@Rubilmax
Copy link
Contributor

Rubilmax commented Nov 23, 2023

Mutation testing report:
Number of mutations:    75
Killed:                 50 / 75

Mutations:
Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/AdaptiveCurveIrm.sol
    Line nr: 75
    Result: Lived
    Original line:
                 require(curveSteepness <= ConstantsLib.MAX_CURVE_STEEPNESS, ErrorsLib.INPUT_TOO_LARGE);

    Mutated line:
                 require(curveSteepness < ConstantsLib.MAX_CURVE_STEEPNESS, ErrorsLib.INPUT_TOO_LARGE);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/AdaptiveCurveIrm.sol
    Line nr: 77
    Result: Lived
    Original line:
                 require(adjustmentSpeed <= ConstantsLib.MAX_ADJUSTMENT_SPEED, ErrorsLib.INPUT_TOO_LARGE);

    Mutated line:
                 require(adjustmentSpeed < ConstantsLib.MAX_ADJUSTMENT_SPEED, ErrorsLib.INPUT_TOO_LARGE);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/AdaptiveCurveIrm.sol
    Line nr: 78
    Result: Lived
    Original line:
                 require(targetUtilization < WAD, ErrorsLib.INPUT_TOO_LARGE);

    Mutated line:
                 require(targetUtilization <= WAD, ErrorsLib.INPUT_TOO_LARGE);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/AdaptiveCurveIrm.sol
    Line nr: 79
    Result: Lived
    Original line:
                 require(targetUtilization > 0, ErrorsLib.ZERO_INPUT);

    Mutated line:
                 require(targetUtilization >= 0, ErrorsLib.ZERO_INPUT);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/AdaptiveCurveIrm.sol
    Line nr: 81
    Result: Lived
    Original line:
                 require(initialRateAtTarget <= ConstantsLib.MAX_RATE_AT_TARGET, ErrorsLib.INPUT_TOO_LARGE);

    Mutated line:
                 require(initialRateAtTarget < ConstantsLib.MAX_RATE_AT_TARGET, ErrorsLib.INPUT_TOO_LARGE);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/AdaptiveCurveIrm.sol
    Line nr: 121
    Result: Lived
    Original line:
                 int256 errNormFactor = utilization > TARGET_UTILIZATION ? WAD - TARGET_UTILIZATION : TARGET_UTILIZATION;

    Mutated line:
                 int256 errNormFactor = utilization >= TARGET_UTILIZATION ? WAD - TARGET_UTILIZATION : TARGET_UTILIZATION;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/libraries/adaptive-curve/ExpLib.sol
    Line nr: 27
    Result: Lived
    Original line:
                     if (x < LN_WEI_INT) return 0;

    Mutated line:
                     if (x <= LN_WEI_INT) return 0;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/libraries/adaptive-curve/ExpLib.sol
    Line nr: 33
    Result: Lived
    Original line:
                     int256 roundingAdjustment = (x < 0) ? -(LN_2_INT / 2) : (LN_2_INT / 2);

    Mutated line:
                     int256 roundingAdjustment = (x <= 0) ? -(LN_2_INT / 2) : (LN_2_INT / 2);


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/lib/morpho-blue/src/libraries/MathLib.sol
    Line nr: 32
    Result: Lived
    Original line:
                 return (x * y + (d - 1)) / d;

    Mutated line:
                 return (x * y + (d - 1)) * d;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/lib/morpho-blue/src/libraries/MathLib.sol
    Line nr: 32
    Result: Lived
    Original line:
                 return (x * y + (d - 1)) / d;

    Mutated line:
                 return (x * y - (d - 1)) / d;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/lib/morpho-blue/src/libraries/MathLib.sol
    Line nr: 32
    Result: Lived
    Original line:
                 return (x * y + (d - 1)) / d;

    Mutated line:
                 return (x / y + (d - 1)) / d;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/lib/morpho-blue/src/libraries/MathLib.sol
    Line nr: 32
    Result: Lived
    Original line:
                 return (x * y + (d - 1)) / d;

    Mutated line:
                 return (x * y + (d + 1)) / d;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/lib/morpho-blue/src/libraries/MathLib.sol
    Line nr: 42
    Result: Lived
    Original line:
                 return firstTerm + secondTerm + thirdTerm;

    Mutated line:
                 return firstTerm + secondTerm - thirdTerm;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/lib/morpho-blue/src/libraries/MathLib.sol
    Line nr: 42
    Result: Lived
    Original line:
                 return firstTerm + secondTerm + thirdTerm;

    Mutated line:
                 return firstTerm - secondTerm + thirdTerm;


Mutation:
    File: /home/rubilmax/sites/morpho.xyz/morpho-blue-irm/src/libraries/adaptive-curve/ConstantsLib.sol
    Line nr: 17
    Result: Lived
    Original line:
             int256 internal constant MAX_ADJUSTMENT_SPEED = int256(1_000 ether) / 365 days;

    Mutated line:
             int256 internal constant MAX_ADJUSTMENT_SPEED = int256(1_000 ether) * 365 days;
@Rubilmax Rubilmax changed the title Test vertigo mutations Test living vertigo mutations Nov 23, 2023
@MathisGD
Copy link
Contributor

@Rubilmax can you run it again pls, I'm curious to see what's remaining

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants