Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed Aug 18, 2024
1 parent 10315dd commit 1d524bc
Showing 1 changed file with 29 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ scalar A
query: Q
}
extend schema @bad")]
extend schema @bad
")]
[InlineData(2,
@"scalar A1
scalar B
Expand All @@ -28,7 +29,8 @@ scalar A2
",
@"scalar A1
scalar A2")]
scalar A2
")]
[InlineData(3,
@"scalar A1
scalar B
Expand All @@ -38,7 +40,8 @@ scalar D
",
@"scalar A1
scalar A2")]
scalar A2
")]
[InlineData(4,
@"query A1 { x }
query B { y }
Expand All @@ -50,15 +53,17 @@ query A2 { z }
query A2 {
z
}")]
}
")]
[InlineData(5,
@"directive @A1 on FIELD
directive @B on FIELD
directive @A2 on FIELD
",
@"directive @A1 on FIELD
directive @A2 on FIELD")]
directive @A2 on FIELD
")]
[InlineData(6,
@"enum A1 { X Y }
enum B { X Y }
Expand All @@ -74,7 +79,8 @@ enum D { X Y }
enum A2 {
X
Y
}")]
}
")]
[InlineData(7,
@"extend enum A1 { X Y }
extend enum B { X Y }
Expand All @@ -90,7 +96,8 @@ extend enum D { X Y }
extend enum A2 {
X
Y
}")]
}
")]
[InlineData(8,
@"input A1 @vip
input B
Expand All @@ -102,7 +109,8 @@ input D
input A2 {
a: Int
}")]
}
")]
[InlineData(9,
@"type A1 @vip
type B
Expand All @@ -114,7 +122,8 @@ type D
type A2 {
a: Int
}")]
}
")]
[InlineData(10,
@"interface A1 @vip
interface B
Expand All @@ -126,7 +135,8 @@ interface D
interface A2 {
a: Int
}")]
}
")]
[InlineData(11,
@"extend interface A1 @vip
extend interface B { a: Int }
Expand All @@ -138,7 +148,8 @@ interface A2 {
extend interface A2 {
a: Int
}")]
}
")]
[InlineData(12,
@"union A1 @vip
union B = X | Y
Expand All @@ -148,7 +159,8 @@ extend interface A2 {
",
@"union A1 @vip
union A2 = X | Y")]
union A2 = X | Y
")]
[InlineData(13,
@"extend input A1 { a: Int }
extend input B { a: Int }
Expand All @@ -162,7 +174,8 @@ extend interface A2 {
extend input A2 {
a: Int
}")]
}
")]
[InlineData(14,
@"extend type A1 { a: Int }
extend type B { a: Int }
Expand All @@ -176,7 +189,8 @@ extend input A2 {
extend type A2 {
a: Int
}")]
}
")]
public async Task Printer_Should_Print_Pretty_If_Definitions_Skipped(
int number,
string text,
Expand All @@ -188,7 +202,7 @@ public async Task Printer_Should_Print_Pretty_If_Definitions_Skipped(

await printer.PrintAsync(document, writer);
var actual = writer.ToString();
actual.ShouldBe(expected + Environment.NewLine, $"Test {number} failed");
actual.ShouldBe(expected, $"Test {number} failed");

actual.Parse(); // should be parsed back
}
Expand Down

0 comments on commit 1d524bc

Please sign in to comment.