Commit Graph

39 Commits

Author SHA1 Message Date
KtorZ 39f5d1a86d
Make build, check and docs target directory an (optional) argument
Instead of being an option. Feels more natural that way.
2022-12-23 20:23:27 +01:00
KtorZ 2aa4429231
Rename Unit -> Void 2022-12-22 18:52:28 +01:00
KtorZ 757428fa7f
Add new acceptance test scenario 033
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:523:17
    ╰─▶ not yet implemented: Tuple indexing not implementing yet
  ```
2022-12-22 09:14:23 +01:00
rvcas 9028424a96 feat: rename Nil to Unit 2022-12-21 17:27:20 -05:00
rvcas 429126e38f feat: add trace 2022-12-21 14:39:46 -05:00
KtorZ 9068c89c00 Show trace logs as part of the test output when any.
```
  ┍━ test ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  │ PASS [mem: 6370, cpu: 2591822] trace_1
  │ ↳ is negative
  │ ↳ is non-negative
  ┕━━━━━━━━━ 1 tests | 1 passed | 0 failed
  ```
2022-12-21 14:39:46 -05:00
KtorZ 5d459b25bd Add new acceptance test scenario 032
```
  Error: aiken::parser

    × Parsing
    ╰─▶ Unexpected "try"

     ╭─[032/lib/test.ak:3:1]
   3 │ test trace_1() {
   4 │   builtin.trace("foo", True)
     ·           ─────
   5 │ }
     ╰────
    help: Try removing it
  ```
2022-12-21 14:39:46 -05:00
KtorZ 414a114530
fix acceptance tests manifest. 2022-12-21 14:06:46 +01:00
Kasey White ac14512706 feat: fix nil equals nil, and fix funcs with discard params 2022-12-20 15:40:01 -05:00
KtorZ 102bb7735e
Add new integration test scenario 031
```
  × clamp_1 failed
  help: ┍━ left ━━━━━━━━━━┑
        │ (con integer 0) │
        ┕━━━━━━━━━━━━━━━━━┙

        should be equal to

        ┍━ right ━━━━━━━━━━┑
        │ (con integer 10) │
        ┕━━━━━━━━━━━━━━━━━━┙
  ```
2022-12-20 04:48:03 +01:00
KtorZ 030172e1dc
Add new acceptance test scenario 030
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:1897:45
    ╰─▶ called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }
  ```
2022-12-20 04:37:55 +01:00
KtorZ 58c123a930
Add new intgration test scenario 029
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2395:56
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_insert", unique:
        Unique(1) })
  ```
2022-12-20 04:21:28 +01:00
KtorZ daa3fa5d33
Add new acceptance test scenario 028
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/builder.rs:1257:30
    ╰─▶ internal error: entered unreachable code
  ```
2022-12-20 02:55:01 +01:00
KtorZ fec7431d11
Add new acceptance test scenario 027
```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:640:36
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_foo", unique:
        Unique(0) })
  ```
2022-12-20 02:32:43 +01:00
KtorZ 8bd4fd0cda
Add new acceptance test scenario
```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:620:22
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text:
        "test_foldr_list_int_data_list_int", unique: Unique(10) })
  ```
2022-12-20 02:22:04 +01:00
KtorZ fccad9e7dd
Add new acceptance test scenario 025
```
  help: ┍━ left ━━━━━━━━┑
        │ (con unit ()) │
        ┕━━━━━━━━━━━━━━━┙

        should be equal to

        ┍━ right ━━━━━━━┑
        │ (con unit ()) │
        ┕━━━━━━━━━━━━━━━┙
  ```
2022-12-20 01:07:15 +01:00
KtorZ f511b2f71b
Add new acceptance test scenario 024
```
  × map2_3 failed
  help: ┍━ left ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
        │ Type mismatch expected 'integer' got 'pair data data' │
        ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

        should be equal to

        ┍━ right ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
        │ Type mismatch expected 'list pair data data' got 'list data' │
        ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙
  ```
2022-12-19 18:55:50 +01:00
KtorZ dbd3d3fd7d
Add new acceptance test scenario 023
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2830:32
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
2022-12-19 18:51:46 +01:00
Kasey White 421e7148d0 zero arg functions now work: test 15 2022-12-19 00:41:27 -05:00
KtorZ a51808d549 Add new acceptance test scenario (022)
```
  thread 'main' has overflowed its stack
  fatal runtime error: stack overflo
  ```
2022-12-19 00:41:27 -05:00
Kasey White 2bce818110 chore: fix list insertion order, function insertion order,
and Inner function issues with variant
2022-12-19 00:41:27 -05:00
KtorZ 0d0e698d5e Add new acceptance test scenario (021)
```
  Error: aiken::check

    × Checking
    ╰─▶ Unknown type

        VerificationKey

     ╭─[021/lib/test.ak:4:1]
   4 │ pub type PoolId =
   5 │   Hash<VerificationKey>
     ·        ───────────────
   6 │
     ╰────
  ```
2022-12-19 00:41:27 -05:00
KtorZ ed58a1cac7 Add new acceptance test scenario (020)
```
  Error: 020/lib/test.ak

    × map_2 failed
    help: ┍━ left ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
          │ Type mismatch expected 'integer' got 'data' │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

          should be equal to

          ┍━ right ━━━━━━━━━━━━━━━━┑
          │ (con data #d8799f0fff) │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━┙
  ```
2022-12-19 00:41:27 -05:00
KtorZ e3ea511b79 Add new acceptance test scenario (019)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2001:81
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
2022-12-19 00:41:27 -05:00
KtorZ 287fbf2e3b Add new acceptance test scenario (018)
```
  Error: examples/acceptance_tests/018/lib/test.ak

    × or_else_2 failed
    help: ┍━ left ━━━━━━━━━━━┑
          │ (con data #182a) │
          ┕━━━━━━━━━━━━━━━━━━┙

          should be equal to

          ┍━ right ━━━━━━━━━━┑
          │ (con integer 42) │
          ┕━━━━━━━━━━━━━━━━━━┙
  ```
2022-12-19 00:41:27 -05:00
KtorZ 6e46e7562e Add new acceptance test scenario (017)
```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:596:22
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
        Unique(6) })
  ```
2022-12-19 00:41:27 -05:00
KtorZ 00b800c456 Add new acceptance test scenario (016)
```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:616:36
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
        Unique(7) })
  ```
2022-12-19 00:41:27 -05:00
KtorZ bd956efd36
Rework acceptance test 014 to smaller reproducible scenario 2022-12-14 10:20:43 +01:00
KtorZ 7c54283e69
Add new acceptance test scenario (015)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2388:21
    ╰─▶ not yet implemented
  ```
2022-12-14 10:20:43 +01:00
KtorZ 95df5f9137
Add new acceptance test scenario (014) 2022-12-14 09:45:26 +01:00
KtorZ bc7c236b3b
Add new acceptance test scenario (013)
```
  ERROR:
  The provided Plutus code called 'error'
  ```
2022-12-14 09:45:25 +01:00
KtorZ 9c902cdf89
Add new acceptance test scenario (012)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:3413:34
    ╰─▶ internal error: entered unreachable code: Var {
            scope: [
                0,
                1,
                3,
                24,
                25,
                29,
                32,
            ],
            constructor: ValueConstructor {
                public: false,
                variant: LocalVariable {
                    location: 46..62,
                },
                tipo: Fn {
                    args: [
                        Var {
                            tipo: RefCell {
                                value: Link {
                                    tipo: App {
                                        public: true,
                                        module: "",
                                        name: "Int",
                                        args: [],
                                    },
                                },
                            },
                        },
                    ],
                    ret: App {
                        public: true,
                        module: "",
                        name: "Bool",
                        args: [],
                    },
                },
            },
            name: "f",
            variant_name: "",
        }
  ```
2022-12-14 09:45:25 +01:00
KtorZ f53caff538
Add new acceptance test scenario (011)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:4022:40
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
2022-12-14 09:45:25 +01:00
rvcas 299cd1ac24
fix: tuples 2022-12-14 09:45:25 +01:00
KtorZ 37def91fc5
Add new acceptance test scenario (010)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:688:33
    ╰─▶ called `Option::unwrap()` on a `None` value
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ 4217fd06b5
Add new acceptance test scenario (009)
Note: the problem is only present when importing a builtin explicitly.
  When using a qualified import, it compiles fine.

  ```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:3264:35
    ╰─▶ called `Option::unwrap()` on a `None` value
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ adf34e9dc6
Add new acceptance test scenario (008)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:530:41
    ╰─▶ not yet implemented
    help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
  ```
2022-12-14 09:45:24 +01:00
KtorZ 022fc36dd2
Add new (failing) acceptance test (007)
```
  Error: aiken::check

    × Checking
    ╰─▶ Not a function
     ╭─[./007/lib/test.ak:4:1]
   4 │     [(a, b), ..rest] -> {
   5 │       let (a_tail, b_tail) = unzip(rest)
     ·                                   ──────
   6 │       ([a, ..a_tail], [b, ..b_tail])
     ╰────
  ```
2022-12-14 09:45:24 +01:00
KtorZ a62fb1905e
rename examples/tests/{a,b,c,d,e,f} into examples/acceptance_tests/00{1,2,3,4,5,6}
Also added a little Makefile to run them all in one go.
2022-12-14 09:45:24 +01:00