Skip to content

Commit 8e4e4cf

Browse files
committed
Remove plutus-tx-plugin test Lib module which duplicates PlutusTx.Test
1 parent 0eb1408 commit 8e4e4cf

18 files changed

+88
-167
lines changed

plutus-tx-plugin/plutus-tx-plugin.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ test-suite plutus-tx-plugin-tests
141141
IntegerLiterals.Strict.NegativeLiterals.Spec
142142
IntegerLiterals.Strict.NoNegativeLiterals.Spec
143143
IsData.Spec
144-
Lib
145144
Lift.Spec
146145
List.Properties1
147146
List.Properties2

plutus-tx-plugin/test/Lib.hs

Lines changed: 0 additions & 82 deletions
This file was deleted.

plutus-tx-plugin/test/Plugin/Strict/Spec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ strict = testNested "Strict" . pure $ testNestedGhc
3838
-- in this instance (see
3939
-- https://github.com/IntersectMBO/plutus/pull/5371#discussion_r1285087508),
4040
-- however we have now fixed the bug on our side so it's just GHC being annoying.
41-
, goldenEvalCekLog "issue4645" [ issue4645 ]
41+
, goldenEvalCekLog "issue4645" issue4645
4242
]
4343

4444
strictAdd :: CompiledCode (Integer -> Integer -> Integer)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
An error has occurred:
2+
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
An error has occurred:
2+
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
An error has occurred:
2+
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cpu: 393439
2+
mem: 1802
3+
size: 27
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cpu: 393439
2+
mem: 1802
3+
size: 27
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cpu: 393439
2+
mem: 1802
3+
size: 27
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
(program
2-
1.1.0
3-
(let
4-
(nonrec)
5-
(datatypebind
6-
(datatype
7-
(tyvardecl Bool (type))
1+
(let
2+
(nonrec)
3+
(datatypebind
4+
(datatype
5+
(tyvardecl Bool (type))
86

9-
Bool_match
10-
(vardecl True Bool) (vardecl False Bool)
11-
)
7+
Bool_match
8+
(vardecl True Bool) (vardecl False Bool)
129
)
13-
False
1410
)
11+
False
1512
)
Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,55 @@
1-
(program
2-
1.1.0
3-
(let
4-
(nonrec)
5-
(termbind
6-
(strict)
7-
(vardecl
8-
multiplyInteger (fun (con integer) (fun (con integer) (con integer)))
9-
)
10-
(builtin multiplyInteger)
1+
(let
2+
(nonrec)
3+
(termbind
4+
(strict)
5+
(vardecl
6+
multiplyInteger (fun (con integer) (fun (con integer) (con integer)))
117
)
12-
(termbind
13-
(nonstrict)
14-
(vardecl
15-
multiplyInteger (fun (con integer) (fun (con integer) (con integer)))
16-
)
17-
(lam
18-
x
19-
(con integer)
20-
(let
21-
(nonrec)
22-
(termbind (strict) (vardecl x (con integer)) x)
23-
(lam
24-
y
25-
(con integer)
26-
(let
27-
(nonrec)
28-
(termbind (strict) (vardecl y (con integer)) y)
29-
[ [ multiplyInteger x ] y ]
30-
)
31-
)
32-
)
33-
)
8+
(builtin multiplyInteger)
9+
)
10+
(termbind
11+
(nonstrict)
12+
(vardecl
13+
multiplyInteger (fun (con integer) (fun (con integer) (con integer)))
3414
)
3515
(lam
36-
ds
16+
x
3717
(con integer)
3818
(let
3919
(nonrec)
40-
(termbind (strict) (vardecl ds (con integer)) ds)
41-
(termbind
42-
(strict)
43-
(vardecl y (con integer))
20+
(termbind (strict) (vardecl x (con integer)) x)
21+
(lam
22+
y
23+
(con integer)
4424
(let
4525
(nonrec)
46-
(termbind
47-
(strict)
48-
(vardecl y (con integer))
49-
[ [ multiplyInteger ds ] (con integer 1) ]
50-
)
51-
[ [ multiplyInteger y ] y ]
26+
(termbind (strict) (vardecl y (con integer)) y)
27+
[ [ multiplyInteger x ] y ]
28+
)
29+
)
30+
)
31+
)
32+
)
33+
(lam
34+
ds
35+
(con integer)
36+
(let
37+
(nonrec)
38+
(termbind (strict) (vardecl ds (con integer)) ds)
39+
(termbind
40+
(strict)
41+
(vardecl y (con integer))
42+
(let
43+
(nonrec)
44+
(termbind
45+
(strict)
46+
(vardecl y (con integer))
47+
[ [ multiplyInteger ds ] (con integer 1) ]
5248
)
49+
[ [ multiplyInteger y ] y ]
5350
)
54-
[ [ multiplyInteger y ] y ]
5551
)
52+
[ [ multiplyInteger y ] y ]
5653
)
5754
)
5855
)
Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
(program
2-
1.1.0
3-
(let
4-
(nonrec)
5-
(datatypebind
6-
(datatype
7-
(tyvardecl Bool (type))
1+
(let
2+
(nonrec)
3+
(datatypebind
4+
(datatype
5+
(tyvardecl Bool (type))
86

9-
Bool_match
10-
(vardecl True Bool) (vardecl False Bool)
11-
)
7+
Bool_match
8+
(vardecl True Bool) (vardecl False Bool)
129
)
13-
(lam
14-
ds
15-
Bool
16-
(let
17-
(nonrec)
18-
(termbind (strict) (vardecl ds Bool) ds)
19-
[
20-
[ { [ Bool_match ds ] (con integer) } (con integer 1) ]
21-
(con integer 2)
22-
]
23-
)
10+
)
11+
(lam
12+
ds
13+
Bool
14+
(let
15+
(nonrec)
16+
(termbind (strict) (vardecl ds Bool) ds)
17+
[
18+
[ { [ Bool_match ds ] (con integer) } (con integer 1) ] (con integer 2)
19+
]
2420
)
2521
)
2622
)

plutus-tx-plugin/test/TH/Spec.hs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ module TH.Spec (tests) where
1515

1616
import Test.Tasty.Extras
1717

18-
import Lib
19-
2018
import PlutusCore.Pretty
2119

2220
import PlutusTx
2321
import PlutusTx.Builtins qualified as Builtins
2422
import PlutusTx.List qualified as List
2523
import PlutusTx.Prelude
2624
import PlutusTx.Show (show)
25+
import PlutusTx.Test
2726

2827
import Prelude qualified as Haskell
2928

@@ -41,11 +40,11 @@ tests = testNested "TH" . pure $ testNestedGhc
4140
[ goldenPir "simple" simple
4241
, goldenPir "power" powerPlc
4342
, goldenPir "and" andPlc
44-
, goldenEvalCek "all" [allPlc]
45-
, goldenEvalCek "convertString" [convertString]
46-
, goldenEvalCekLog "traceDirect" [traceDirect]
47-
, goldenEvalCekLog "tracePrelude" [tracePrelude]
48-
, goldenEvalCekLog "traceRepeatedly" [traceRepeatedly]
43+
, goldenEvalCek "all" allPlc
44+
, goldenEvalCek "convertString" convertString
45+
, goldenEvalCekLog "traceDirect" traceDirect
46+
, goldenEvalCekLog "tracePrelude" tracePrelude
47+
, goldenEvalCekLog "traceRepeatedly" traceRepeatedly
4948
-- want to see the raw structure, so using Show
5049
, nestedGoldenVsDoc "someData" "" (pretty $ Haskell.show someData)
5150
]

0 commit comments

Comments
 (0)