Skip to content

Commit

Permalink
roundtrip test on github
Browse files Browse the repository at this point in the history
  • Loading branch information
obmarg committed May 18, 2024
1 parent e952085 commit 9feb8f9
Show file tree
Hide file tree
Showing 3 changed files with 542 additions and 193 deletions.
10 changes: 10 additions & 0 deletions cynic-parser/tests/actual_schemas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ macro_rules! schema_tests {
insta::assert_snapshot!(parsed.to_sdl());
}

#[test]
fn roundtrip() {
let parsed = cynic_parser::parse_type_system_document(SCHEMA)
.map_err(|error| error.to_report(SCHEMA))
.unwrap();
let sdl = parsed.to_sdl();

assert_eq!(SCHEMA, sdl);
}

#[test]
fn double_roundtrip() {
let parsed = cynic_parser::parse_type_system_document(SCHEMA)
Expand Down
Loading

0 comments on commit 9feb8f9

Please sign in to comment.