Skip to content

Commit

Permalink
ambr toMatchInlineSnapshot toMatchSnapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Apr 5, 2024
1 parent 0a4d564 commit 6141a96
Show file tree
Hide file tree
Showing 130 changed files with 3,820 additions and 825 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compute ApImplicit -- insertion -- deepWalk required >
"cons(\\"abc\\", sole): Pair(String, Trivial)
cons(\\"abc\\", sole): Pair(String, Trivial)"
1`] = `
"cons(\\"abc\\", sole): Pair(String, Trivial)
cons(\\"abc\\", sole): Pair(String, Trivial)"
`;

exports[`compute ApImplicit -- insertion -- deepWalk required:
"cons("abc", sole): Pair(String, Trivial)
cons("abc", sole): Pair(String, Trivial)"
1`] = `
"cons("abc", sole): Pair(String, Trivial)
cons("abc", sole): Pair(String, Trivial)"
`;

exports[`compute ApImplicit -- insertion -- during check > "(_) => _: (String) -> String" 1`] = `"(_) => _: (String) -> String"`;

exports[`compute ApImplicit -- insertion -- during check: "(_) => _: (String) -> String" 1`] = `"(_) => _: (String) -> String"`;

exports[`compute ApImplicit -- insertion -- id >
"sole: Trivial
\\"abc\\": String"
1`] = `
"sole: Trivial
\\"abc\\": String"
`;

exports[`compute ApImplicit -- insertion -- id:
"sole: Trivial
"abc": String"
1`] = `
"sole: Trivial
"abc": String"
`;

exports[`compute ApImplicit -- insertion -- infer >
"Trivial: Type
String: Type"
1`] = `
"Trivial: Type
String: Type"
`;

exports[`compute ApImplicit -- insertion -- infer:
"Trivial: Type
String: Type"
1`] = `
"Trivial: Type
String: Type"
`;

exports[`compute ApImplicit -- insertion -- infer2 >
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
1`] = `
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
`;

exports[`compute ApImplicit -- insertion -- infer2 -- over >
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
1`] = `
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
`;

exports[`compute ApImplicit -- insertion -- infer2 -- over:
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
1`] = `
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
`;

exports[`compute ApImplicit -- insertion -- infer2:
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
1`] = `
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
`;

exports[`compute ApImplicit -- insertion -- inferReturnType >
"Trivial: Type
String: Type"
1`] = `
"Trivial: Type
String: Type"
`;

exports[`compute ApImplicit -- insertion -- inferReturnType:
"Trivial: Type
String: Type"
1`] = `
"Trivial: Type
String: Type"
`;

exports[`compute ApImplicit -- insertion -- nested >
"cons(cons(\\"abc\\", sole), sole): Pair(Pair(String, Trivial), Trivial)
cons(cons(cons(\\"abc\\", sole), sole), sole): Pair(Pair(Pair(String, Trivial), Trivial), Trivial)"
1`] = `
"cons(cons(\\"abc\\", sole), sole): Pair(Pair(String, Trivial), Trivial)
cons(cons(cons(\\"abc\\", sole), sole), sole): Pair(Pair(Pair(String, Trivial), Trivial), Trivial)"
`;

exports[`compute ApImplicit -- insertion -- nested:
"cons(cons("abc", sole), sole): Pair(Pair(String, Trivial), Trivial)
cons(cons(cons("abc", sole), sole), sole): Pair(Pair(Pair(String, Trivial), Trivial), Trivial)"
1`] = `
"cons(cons("abc", sole), sole): Pair(Pair(String, Trivial), Trivial)
cons(cons(cons("abc", sole), sole), sole): Pair(Pair(Pair(String, Trivial), Trivial), Trivial)"
`;

exports[`compute ApImplicit -- insertion -- id 1`] = `
"sole: Trivial
"abc": String"
`;

exports[`compute ApImplicit -- insertion -- infer 1`] = `
"Trivial: Type
String: Type"
`;

exports[`compute ApImplicit -- insertion -- infer2 1`] = `
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
`;

exports[`compute ApImplicit -- insertion -- infer2 -- over 1`] = `
"Pair(Trivial, String): Type
Pair(Trivial, Trivial): Type
Pair(String, Trivial): Type
Pair(String, String): Type"
`;

exports[`compute ApImplicit -- insertion -- inferReturnType 1`] = `
"Trivial: Type
String: Type"
`;

exports[`compute ApImplicit -- insertion -- deepWalk required 1`] = `
"cons("abc", sole): Pair(String, Trivial)
cons("abc", sole): Pair(String, Trivial)"
`;

exports[`compute ApImplicit -- insertion -- nested 1`] = `
"cons(cons("abc", sole), sole): Pair(Pair(String, Trivial), Trivial)
cons(cons(cons("abc", sole), sole), sole): Pair(Pair(Pair(String, Trivial), Trivial), Trivial)"
`;

exports[`compute ApImplicit -- insertion -- during check 1`] = `"(_) => _: (String) -> String"`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compute ApImplicit > "Trivial: Type" 1`] = `"Trivial: Type"`;

exports[`compute ApImplicit: "Trivial: Type" 1`] = `"Trivial: Type"`;

exports[`compute ApImplicit 1`] = `"Trivial: Type"`;
7 changes: 7 additions & 0 deletions src/lang/tests/compute/__snapshots__/compute-ap.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compute Ap > "Type: Type" 1`] = `"Type: Type"`;

exports[`compute Ap: "Type: Type" 1`] = `"Type: Type"`;

exports[`compute Ap 1`] = `"Type: Type"`;
19 changes: 19 additions & 0 deletions src/lang/tests/compute/__snapshots__/compute-car.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compute Car > "Type: Type" 1`] = `"Type: Type"`;

exports[`compute Car -- just car > "(implicit A, implicit B, target) => car(target): (implicit A: Type, implicit B: (A) -> Type, exists (A) B(x)) -> A" 1`] = `"(implicit A, implicit B, target) => car(target): (implicit A: Type, implicit B: (A) -> Type, exists (A) B(x)) -> A"`;

exports[`compute Car -- just car: "(implicit A, implicit B, target) => car(target): (implicit A: Type, implicit B: (A) -> Type, exists (A) B(x)) -> A" 1`] = `"(implicit A, implicit B, target) => car(target): (implicit A: Type, implicit B: (A) -> Type, exists (A) B(x)) -> A"`;

exports[`compute Car -- my_car > "\\"a\\": String" 1`] = `"\\"a\\": String"`;

exports[`compute Car -- my_car: ""a": String" 1`] = `""a": String"`;

exports[`compute Car: "Type: Type" 1`] = `"Type: Type"`;

exports[`compute Car 1`] = `"Type: Type"`;

exports[`compute Car -- just car 1`] = `"(implicit A, implicit B, target) => car(target): (implicit A: Type, implicit B: (A) -> Type, exists (A) B(x)) -> A"`;

exports[`compute Car -- my_car 1`] = `""a": String"`;
55 changes: 55 additions & 0 deletions src/lang/tests/compute/__snapshots__/compute-cdr.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compute Cdr > "Type: Type" 1`] = `"Type: Type"`;

exports[`compute Cdr -- just cdr >
"(implicit A, implicit B, target) => cdr(target): (
implicit A: Type,
implicit B: (A) -> Type,
target: exists (A) B(x),
) -> B(car(target))"
1`] = `
"(implicit A, implicit B, target) => cdr(target): (
implicit A: Type,
implicit B: (A) -> Type,
target: exists (A) B(x),
) -> B(car(target))"
`;

exports[`compute Cdr -- just cdr:
"(implicit A, implicit B, target) => cdr(target): (
implicit A: Type,
implicit B: (A) -> Type,
target: exists (A) B(x),
) -> B(car(target))"
1`] = `
"(implicit A, implicit B, target) => cdr(target): (
implicit A: Type,
implicit B: (A) -> Type,
target: exists (A) B(x),
) -> B(car(target))"
`;

exports[`compute Cdr -- my_cdr > "\\"b\\": String" 1`] = `"\\"b\\": String"`;

exports[`compute Cdr -- my_cdr -- infer FnImplicitAnnotated > "\\"b\\": String" 1`] = `"\\"b\\": String"`;

exports[`compute Cdr -- my_cdr -- infer FnImplicitAnnotated: ""b": String" 1`] = `""b": String"`;

exports[`compute Cdr -- my_cdr: ""b": String" 1`] = `""b": String"`;

exports[`compute Cdr: "Type: Type" 1`] = `"Type: Type"`;

exports[`compute Cdr 1`] = `"Type: Type"`;

exports[`compute Cdr -- just cdr 1`] = `
"(implicit A, implicit B, target) => cdr(target): (
implicit A: Type,
implicit B: (A) -> Type,
target: exists (A) B(x),
) -> B(car(target))"
`;

exports[`compute Cdr -- my_cdr 1`] = `""b": String"`;

exports[`compute Cdr -- my_cdr -- infer FnImplicitAnnotated 1`] = `""b": String"`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compute Clazz -- JSON >
"class {
\\"Hello, World!\\": String
}: Type
class {
\\"Hello, World!\\": String = \\"Hi!\\"
}: Type"
1`] = `
"class {
\\"Hello, World!\\": String
}: Type
class {
\\"Hello, World!\\": String = \\"Hi!\\"
}: Type"
`;

exports[`compute Clazz -- JSON:
"class {
"Hello, World!": String
}: Type
class {
"Hello, World!": String = "Hi!"
}: Type"
1`] = `
"class {
"Hello, World!": String
}: Type
class {
"Hello, World!": String = "Hi!"
}: Type"
`;

exports[`compute Clazz -- JSON 1`] = `
"class {
"Hello, World!": String
}: Type
class {
"Hello, World!": String = "Hi!"
}: Type"
`;
82 changes: 82 additions & 0 deletions src/lang/tests/compute/__snapshots__/compute-clazz.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compute Clazz >
"class {
T: Type
x: T
}: Type
class {
a: String
b: String
c: String
}: Type
class {
a: String
b: String = \\"b\\"
c: String
}: Type"
1`] = `
"class {
T: Type
x: T
}: Type
class {
a: String
b: String
c: String
}: Type
class {
a: String
b: String = \\"b\\"
c: String
}: Type"
`;

exports[`compute Clazz:
"class {
T: Type
x: T
}: Type
class {
a: String
b: String
c: String
}: Type
class {
a: String
b: String = "b"
c: String
}: Type"
1`] = `
"class {
T: Type
x: T
}: Type
class {
a: String
b: String
c: String
}: Type
class {
a: String
b: String = "b"
c: String
}: Type"
`;

exports[`compute Clazz 1`] = `
"class {
T: Type
x: T
}: Type
class {
a: String
b: String
c: String
}: Type
class {
a: String
b: String = "b"
c: String
}: Type"
`;
Loading

0 comments on commit 6141a96

Please sign in to comment.