From 8a78323b2d5b6ffdf7e1a0d5e8516788bc269593 Mon Sep 17 00:00:00 2001 From: GregTheDev <40359730+0xgregthedev@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:30:32 -0500 Subject: [PATCH] AST-1949 chore: restructure tests (#30) * chore: restructure tests * use remapping for test imports --- test/{ => fuzz-testing/differential-fuzzing}/TestUtils.sol | 0 test/{ => integration-testing}/TestAstariaV1Loan.sol | 2 +- test/{ => integration-testing}/TestExoticLoans.t.sol | 2 +- test/{ => integration-testing}/TestLoanCombinations.t.sol | 2 +- test/{ => integration-testing}/TestNewLoan.sol | 2 +- test/{ => integration-testing}/TestRepayLoan.sol | 2 +- test/{ => unit-testing}/EnforcerTest.t.sol | 2 +- test/{ => unit-testing}/TestCustodian.sol | 2 +- test/{ => unit-testing}/TestLoanManager.sol | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename test/{ => fuzz-testing/differential-fuzzing}/TestUtils.sol (100%) rename test/{ => integration-testing}/TestAstariaV1Loan.sol (99%) rename test/{ => integration-testing}/TestExoticLoans.t.sol (98%) rename test/{ => integration-testing}/TestLoanCombinations.t.sol (99%) rename test/{ => integration-testing}/TestNewLoan.sol (99%) rename test/{ => integration-testing}/TestRepayLoan.sol (97%) rename test/{ => unit-testing}/EnforcerTest.t.sol (99%) rename test/{ => unit-testing}/TestCustodian.sol (99%) rename test/{ => unit-testing}/TestLoanManager.sol (98%) diff --git a/test/TestUtils.sol b/test/fuzz-testing/differential-fuzzing/TestUtils.sol similarity index 100% rename from test/TestUtils.sol rename to test/fuzz-testing/differential-fuzzing/TestUtils.sol diff --git a/test/TestAstariaV1Loan.sol b/test/integration-testing/TestAstariaV1Loan.sol similarity index 99% rename from test/TestAstariaV1Loan.sol rename to test/integration-testing/TestAstariaV1Loan.sol index 94be2124..8577fb3a 100644 --- a/test/TestAstariaV1Loan.sol +++ b/test/integration-testing/TestAstariaV1Loan.sol @@ -1,4 +1,4 @@ -import "./AstariaV1Test.sol"; +import "starport-test/AstariaV1Test.sol"; import {BaseRecall} from "starport-core/hooks/BaseRecall.sol"; // import {Base} from "starport-core/pricing/CompoundInterestPricing.sol"; diff --git a/test/TestExoticLoans.t.sol b/test/integration-testing/TestExoticLoans.t.sol similarity index 98% rename from test/TestExoticLoans.t.sol rename to test/integration-testing/TestExoticLoans.t.sol index 40646e3b..17a7b0ce 100644 --- a/test/TestExoticLoans.t.sol +++ b/test/integration-testing/TestExoticLoans.t.sol @@ -1,4 +1,4 @@ -import "./StarPortTest.sol"; +import "starport-test/StarPortTest.sol"; import {FixedPointMathLib} from "solady/src/utils/FixedPointMathLib.sol"; import {LibString} from "solady/src/utils/LibString.sol"; diff --git a/test/TestLoanCombinations.t.sol b/test/integration-testing/TestLoanCombinations.t.sol similarity index 99% rename from test/TestLoanCombinations.t.sol rename to test/integration-testing/TestLoanCombinations.t.sol index 1985d349..9bff5a99 100644 --- a/test/TestLoanCombinations.t.sol +++ b/test/integration-testing/TestLoanCombinations.t.sol @@ -1,4 +1,4 @@ -import "./StarPortTest.sol"; +import "starport-test/StarPortTest.sol"; import {FixedPointMathLib} from "solady/src/utils/FixedPointMathLib.sol"; import {LibString} from "solady/src/utils/LibString.sol"; diff --git a/test/TestNewLoan.sol b/test/integration-testing/TestNewLoan.sol similarity index 99% rename from test/TestNewLoan.sol rename to test/integration-testing/TestNewLoan.sol index c5cae373..c1b1cd3b 100644 --- a/test/TestNewLoan.sol +++ b/test/integration-testing/TestNewLoan.sol @@ -1,4 +1,4 @@ -import "./StarPortTest.sol"; +import "starport-test/StarPortTest.sol"; import {AstariaV1Pricing} from "starport-core/pricing/AstariaV1Pricing.sol"; contract TestNewLoan is StarPortTest { diff --git a/test/TestRepayLoan.sol b/test/integration-testing/TestRepayLoan.sol similarity index 97% rename from test/TestRepayLoan.sol rename to test/integration-testing/TestRepayLoan.sol index c8f70b17..4e4f81bf 100644 --- a/test/TestRepayLoan.sol +++ b/test/integration-testing/TestRepayLoan.sol @@ -1,4 +1,4 @@ -import "./StarPortTest.sol"; +import "starport-test/StarPortTest.sol"; contract TestRepayLoan is StarPortTest { function testRepayLoan() public { diff --git a/test/EnforcerTest.t.sol b/test/unit-testing/EnforcerTest.t.sol similarity index 99% rename from test/EnforcerTest.t.sol rename to test/unit-testing/EnforcerTest.t.sol index 59551af3..b395dc63 100644 --- a/test/EnforcerTest.t.sol +++ b/test/unit-testing/EnforcerTest.t.sol @@ -1,4 +1,4 @@ -import "./StarPortTest.sol"; +import "starport-test/StarPortTest.sol"; import {FixedPointMathLib} from "solady/src/utils/FixedPointMathLib.sol"; import {LibString} from "solady/src/utils/LibString.sol"; diff --git a/test/TestCustodian.sol b/test/unit-testing/TestCustodian.sol similarity index 99% rename from test/TestCustodian.sol rename to test/unit-testing/TestCustodian.sol index 7190986b..cd427e8d 100644 --- a/test/TestCustodian.sol +++ b/test/unit-testing/TestCustodian.sol @@ -1,4 +1,4 @@ -import "./StarPortTest.sol"; +import "starport-test/StarPortTest.sol"; import {DeepEq} from "starport-test/utils/DeepEq.sol"; import {MockCall} from "starport-test/utils/MockCall.sol"; import "forge-std/Test.sol"; diff --git a/test/TestLoanManager.sol b/test/unit-testing/TestLoanManager.sol similarity index 98% rename from test/TestLoanManager.sol rename to test/unit-testing/TestLoanManager.sol index ba072e1a..a87b6478 100644 --- a/test/TestLoanManager.sol +++ b/test/unit-testing/TestLoanManager.sol @@ -1,4 +1,4 @@ -import "./StarPortTest.sol"; +import "starport-test/StarPortTest.sol"; import {StarPortLib} from "starport-core/lib/StarPortLib.sol"; contract MockOriginator is Originator, TokenReceiverInterface {