Skip to content

Commit

Permalink
Try adding all snapshot files
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Jul 19, 2023
1 parent 83674da commit 9492886
Show file tree
Hide file tree
Showing 61 changed files with 10,796 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ use std::path::PathBuf;
use egglog::*;
use libtest_mimic::Trial;

// Global override to enable all serialization tests.
const ENABLE_ALL_SERIALIZATION_TESTS: bool = true;

#[derive(Clone)]
struct Run {
name: String,
Expand Down Expand Up @@ -104,7 +107,8 @@ fn generate_tests(glob: &str) -> Vec<Trial> {
.replace(['.', '-', ' '], "_");

let should_fail = f.to_string_lossy().contains("fail-typecheck");
let test_serialize = serialize_tests.iter().any(|&e| e == name);
let test_serialize =
ENABLE_ALL_SERIALIZATION_TESTS || serialize_tests.iter().any(|&e| e == name);
mk_trial(
name.clone(),
Run {
Expand Down
256 changes: 256 additions & 0 deletions tests/snapshots/files__antiunify.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
---
source: tests/files.rs
expression: serialized
---
nodes:
String-1976739436905633066:
op: "\"x\""
children: []
eclass: String-1976739436905633066
cost: 0
Var-1976739436905633066:
op: Var
children:
- String-1976739436905633066
eclass: "0"
cost: 1
String-17627030480522586708:
op: "\"y\""
children: []
eclass: String-17627030480522586708
cost: 0
Var-17627030480522586708:
op: Var
children:
- String-17627030480522586708
eclass: "6"
cost: 1
e2-0:
op: e2
children: []
eclass: "7"
cost: 9223372036854776000
e1-0:
op: e1
children: []
eclass: "4"
cost: 9223372036854776000
i64-17615343019692007359:
op: "3"
children: []
eclass: i64-17615343019692007359
cost: 0
Num-17615343019692007359:
op: Num
children:
- i64-17615343019692007359
eclass: "16"
cost: 1
i64-5871781006564002453:
op: "1"
children: []
eclass: i64-5871781006564002453
cost: 0
Num-5871781006564002453:
op: Num
children:
- i64-5871781006564002453
eclass: "35"
cost: 1
i64-11743562013128004906:
op: "2"
children: []
eclass: i64-11743562013128004906
cost: 0
Num-11743562013128004906:
op: Num
children:
- i64-11743562013128004906
eclass: "34"
cost: 1
AU-4604575297633516347:
op: AU
children:
- Add-1714775736476281168
- Add-6465175605220906065
eclass: "8"
cost: 1
AU-16783941965674463102:
op: AU
children:
- Var-1976739436905633066
- Var-17627030480522586708
eclass: "17"
cost: 1
AU-3193214076012305492:
op: AU
children:
- Add-2396186110162359870
- Var-17627030480522586708
eclass: "13"
cost: 1
AU-11611171873070133370:
op: AU
children:
- Num-17615343019692007359
- AU-11611171873070133370
eclass: "16"
cost: 1
AU-1714775736476281168:
op: AU
children:
- Var-1976739436905633066
- Add-2396186110162359870
eclass: "12"
cost: 1
AU-2396186110162359870:
op: AU
children:
- Num-5871781006564002453
- Num-11743562013128004906
eclass: "79"
cost: 1
AU-12559954615023299949:
op: AU
children:
- AU-6688173608459297496
- AU-8267967116726362323
eclass: "80"
cost: 1
AU-6688173608459297496:
op: AU
children:
- AU-6688173608459297496
- Num-11743562013128004906
eclass: "34"
cost: 1
AU-8267967116726362323:
op: AU
children:
- AU-8267967116726362323
- Num-5871781006564002453
eclass: "35"
cost: 1
AU-12411632993112218195:
op: AU
children:
- AU-2396186110162359870
- AU-8267967116726362323
eclass: "40"
cost: 1
au12-0:
op: au12
children: []
eclass: "8"
cost: 9223372036854776000
Add-13761752264459356387:
op: Add
children:
- AU-1714775736476281168
- AU-3193214076012305492
eclass: "8"
cost: 1
Add-15497466658049999176:
op: Add
children:
- AU-3193214076012305492
- AU-1714775736476281168
eclass: "8"
cost: 1
Add-17482952879634135823:
op: Add
children:
- Add-12559954615023299949
- AU-16783941965674463102
eclass: "8"
cost: 1
Add-18439239847648427009:
op: Add
children:
- AU-16783941965674463102
- Num-17615343019692007359
eclass: "8"
cost: 1
Add-3193214076012305492:
op: Add
children:
- AU-11611171873070133370
- Var-17627030480522586708
eclass: "7"
cost: 1
Add-9896396136593852202:
op: Add
children:
- Add-2396186110162359870
- Var-1976739436905633066
eclass: "4"
cost: 1
Add-1714775736476281168:
op: Add
children:
- Var-1976739436905633066
- Add-12559954615023299949
eclass: "4"
cost: 1
Add-6465175605220906065:
op: Add
children:
- Var-17627030480522586708
- Num-17615343019692007359
eclass: "7"
cost: 1
Add-2396186110162359870:
op: Add
children:
- Num-5871781006564002453
- AU-6688173608459297496
eclass: "16"
cost: 1
Add-12559954615023299949:
op: Add
children:
- Num-11743562013128004906
- AU-8267967116726362323
eclass: "16"
cost: 1
root_eclasses: []
class_data:
"0":
type: Expr
String-1976739436905633066:
type: String
"6":
type: Expr
String-17627030480522586708:
type: String
"7":
type: Expr
"4":
type: Expr
"16":
type: Expr
i64-17615343019692007359:
type: i64
"35":
type: Expr
i64-5871781006564002453:
type: i64
"34":
type: Expr
i64-11743562013128004906:
type: i64
"8":
type: Expr
"17":
type: Expr
"13":
type: Expr
"12":
type: Expr
"79":
type: Expr
"80":
type: Expr
"40":
type: Expr

Loading

0 comments on commit 9492886

Please sign in to comment.