From 53eb9c57d6b75f9edc8c1d4178abc6ca7a312f14 Mon Sep 17 00:00:00 2001 From: Ezinwa Okpoechi Date: Sat, 12 May 2018 16:46:29 +0200 Subject: [PATCH] Add generated snapshots --- .../changes,grid,header,numbers.snapshot.txt | 25 +++++++++++++++++++ .../output/changes,grid,header.snapshot.txt | 25 +++++++++++++++++++ .../output/changes,grid,numbers.snapshot.txt | 22 ++++++++++++++++ .../output/changes,grid.snapshot.txt | 22 ++++++++++++++++ .../changes,header,numbers.snapshot.txt | 22 ++++++++++++++++ .../output/changes,header.snapshot.txt | 22 ++++++++++++++++ .../output/changes,numbers.snapshot.txt | 21 ++++++++++++++++ tests/snapshots/output/changes.snapshot.txt | 21 ++++++++++++++++ tests/snapshots/output/full.snapshot.txt | 25 +++++++++++++++++++ .../output/grid,header,numbers.snapshot.txt | 25 +++++++++++++++++++ .../snapshots/output/grid,header.snapshot.txt | 25 +++++++++++++++++++ .../output/grid,numbers.snapshot.txt | 22 ++++++++++++++++ tests/snapshots/output/grid.snapshot.txt | 22 ++++++++++++++++ .../output/header,numbers.snapshot.txt | 22 ++++++++++++++++ tests/snapshots/output/header.snapshot.txt | 22 ++++++++++++++++ tests/snapshots/output/numbers.snapshot.txt | 21 ++++++++++++++++ tests/snapshots/output/plain.snapshot.txt | 21 ++++++++++++++++ 17 files changed, 385 insertions(+) create mode 100644 tests/snapshots/output/changes,grid,header,numbers.snapshot.txt create mode 100644 tests/snapshots/output/changes,grid,header.snapshot.txt create mode 100644 tests/snapshots/output/changes,grid,numbers.snapshot.txt create mode 100644 tests/snapshots/output/changes,grid.snapshot.txt create mode 100644 tests/snapshots/output/changes,header,numbers.snapshot.txt create mode 100644 tests/snapshots/output/changes,header.snapshot.txt create mode 100644 tests/snapshots/output/changes,numbers.snapshot.txt create mode 100644 tests/snapshots/output/changes.snapshot.txt create mode 100644 tests/snapshots/output/full.snapshot.txt create mode 100644 tests/snapshots/output/grid,header,numbers.snapshot.txt create mode 100644 tests/snapshots/output/grid,header.snapshot.txt create mode 100644 tests/snapshots/output/grid,numbers.snapshot.txt create mode 100644 tests/snapshots/output/grid.snapshot.txt create mode 100644 tests/snapshots/output/header,numbers.snapshot.txt create mode 100644 tests/snapshots/output/header.snapshot.txt create mode 100644 tests/snapshots/output/numbers.snapshot.txt create mode 100644 tests/snapshots/output/plain.snapshot.txt diff --git a/tests/snapshots/output/changes,grid,header,numbers.snapshot.txt b/tests/snapshots/output/changes,grid,header,numbers.snapshot.txt new file mode 100644 index 00000000..b15296ee --- /dev/null +++ b/tests/snapshots/output/changes,grid,header,numbers.snapshot.txt @@ -0,0 +1,25 @@ +───────┬──────────────────────────────────────────────────────────────────────── + │ File: sample.rs +───────┼──────────────────────────────────────────────────────────────────────── + 1 │ struct Rectangle { + 2 │ width: u32, + 3 │ height: u32, + 4 │ } + 5 │ + 6 _ │ fn main() { + 7 │ let rect1 = Rectangle { width: 30, height: 50 }; + 8 │ + 9 │ println!( + 10 ~ │ "The perimeter of the rectangle is {} pixels.", + 11 ~ │ perimeter(&rect1) + 12 │ ); + 13 │ } + 14 │ + 15 │ fn area(rectangle: &Rectangle) -> u32 { + 16 │ rectangle.width * rectangle.height + 17 │ } + 18 + │ + 19 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 20 + │ (rectangle.width + rectangle.height) * 2 + 21 + │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes,grid,header.snapshot.txt b/tests/snapshots/output/changes,grid,header.snapshot.txt new file mode 100644 index 00000000..cb53d7a8 --- /dev/null +++ b/tests/snapshots/output/changes,grid,header.snapshot.txt @@ -0,0 +1,25 @@ +───────┬──────────────────────────────────────────────────────────────────────── + │ File: sample.rs +───────┼──────────────────────────────────────────────────────────────────────── + │ struct Rectangle { + │ width: u32, + │ height: u32, + │ } + │ + _ │ fn main() { + │ let rect1 = Rectangle { width: 30, height: 50 }; + │ + │ println!( + ~ │ "The perimeter of the rectangle is {} pixels.", + ~ │ perimeter(&rect1) + │ ); + │ } + │ + │ fn area(rectangle: &Rectangle) -> u32 { + │ rectangle.width * rectangle.height + │ } + + │ + + │ fn perimeter(rectangle: &Rectangle) -> u32 { + + │ (rectangle.width + rectangle.height) * 2 + + │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes,grid,numbers.snapshot.txt b/tests/snapshots/output/changes,grid,numbers.snapshot.txt new file mode 100644 index 00000000..fd078f3a --- /dev/null +++ b/tests/snapshots/output/changes,grid,numbers.snapshot.txt @@ -0,0 +1,22 @@ + 1 │ struct Rectangle { + 2 │ width: u32, + 3 │ height: u32, + 4 │ } + 5 │ + 6 _ │ fn main() { + 7 │ let rect1 = Rectangle { width: 30, height: 50 }; + 8 │ + 9 │ println!( + 10 ~ │ "The perimeter of the rectangle is {} pixels.", + 11 ~ │ perimeter(&rect1) + 12 │ ); + 13 │ } + 14 │ + 15 │ fn area(rectangle: &Rectangle) -> u32 { + 16 │ rectangle.width * rectangle.height + 17 │ } + 18 + │ + 19 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 20 + │ (rectangle.width + rectangle.height) * 2 + 21 + │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes,grid.snapshot.txt b/tests/snapshots/output/changes,grid.snapshot.txt new file mode 100644 index 00000000..ff7ea09d --- /dev/null +++ b/tests/snapshots/output/changes,grid.snapshot.txt @@ -0,0 +1,22 @@ + │ struct Rectangle { + │ width: u32, + │ height: u32, + │ } + │ + _ │ fn main() { + │ let rect1 = Rectangle { width: 30, height: 50 }; + │ + │ println!( + ~ │ "The perimeter of the rectangle is {} pixels.", + ~ │ perimeter(&rect1) + │ ); + │ } + │ + │ fn area(rectangle: &Rectangle) -> u32 { + │ rectangle.width * rectangle.height + │ } + + │ + + │ fn perimeter(rectangle: &Rectangle) -> u32 { + + │ (rectangle.width + rectangle.height) * 2 + + │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/changes,header,numbers.snapshot.txt b/tests/snapshots/output/changes,header,numbers.snapshot.txt new file mode 100644 index 00000000..1b190a19 --- /dev/null +++ b/tests/snapshots/output/changes,header,numbers.snapshot.txt @@ -0,0 +1,22 @@ +File: sample.rs + 1 struct Rectangle { + 2 width: u32, + 3 height: u32, + 4 } + 5 + 6 _ fn main() { + 7 let rect1 = Rectangle { width: 30, height: 50 }; + 8 + 9 println!( + 10 ~ "The perimeter of the rectangle is {} pixels.", + 11 ~ perimeter(&rect1) + 12 ); + 13 } + 14 + 15 fn area(rectangle: &Rectangle) -> u32 { + 16 rectangle.width * rectangle.height + 17 } + 18 + + 19 + fn perimeter(rectangle: &Rectangle) -> u32 { + 20 + (rectangle.width + rectangle.height) * 2 + 21 + } diff --git a/tests/snapshots/output/changes,header.snapshot.txt b/tests/snapshots/output/changes,header.snapshot.txt new file mode 100644 index 00000000..f914c95b --- /dev/null +++ b/tests/snapshots/output/changes,header.snapshot.txt @@ -0,0 +1,22 @@ +File: sample.rs + struct Rectangle { + width: u32, + height: u32, + } + +_ fn main() { + let rect1 = Rectangle { width: 30, height: 50 }; + + println!( +~ "The perimeter of the rectangle is {} pixels.", +~ perimeter(&rect1) + ); + } + + fn area(rectangle: &Rectangle) -> u32 { + rectangle.width * rectangle.height + } ++ ++ fn perimeter(rectangle: &Rectangle) -> u32 { ++ (rectangle.width + rectangle.height) * 2 ++ } diff --git a/tests/snapshots/output/changes,numbers.snapshot.txt b/tests/snapshots/output/changes,numbers.snapshot.txt new file mode 100644 index 00000000..eabb3c1c --- /dev/null +++ b/tests/snapshots/output/changes,numbers.snapshot.txt @@ -0,0 +1,21 @@ + 1 struct Rectangle { + 2 width: u32, + 3 height: u32, + 4 } + 5 + 6 _ fn main() { + 7 let rect1 = Rectangle { width: 30, height: 50 }; + 8 + 9 println!( + 10 ~ "The perimeter of the rectangle is {} pixels.", + 11 ~ perimeter(&rect1) + 12 ); + 13 } + 14 + 15 fn area(rectangle: &Rectangle) -> u32 { + 16 rectangle.width * rectangle.height + 17 } + 18 + + 19 + fn perimeter(rectangle: &Rectangle) -> u32 { + 20 + (rectangle.width + rectangle.height) * 2 + 21 + } diff --git a/tests/snapshots/output/changes.snapshot.txt b/tests/snapshots/output/changes.snapshot.txt new file mode 100644 index 00000000..5695ea6b --- /dev/null +++ b/tests/snapshots/output/changes.snapshot.txt @@ -0,0 +1,21 @@ + struct Rectangle { + width: u32, + height: u32, + } + +_ fn main() { + let rect1 = Rectangle { width: 30, height: 50 }; + + println!( +~ "The perimeter of the rectangle is {} pixels.", +~ perimeter(&rect1) + ); + } + + fn area(rectangle: &Rectangle) -> u32 { + rectangle.width * rectangle.height + } ++ ++ fn perimeter(rectangle: &Rectangle) -> u32 { ++ (rectangle.width + rectangle.height) * 2 ++ } diff --git a/tests/snapshots/output/full.snapshot.txt b/tests/snapshots/output/full.snapshot.txt new file mode 100644 index 00000000..b15296ee --- /dev/null +++ b/tests/snapshots/output/full.snapshot.txt @@ -0,0 +1,25 @@ +───────┬──────────────────────────────────────────────────────────────────────── + │ File: sample.rs +───────┼──────────────────────────────────────────────────────────────────────── + 1 │ struct Rectangle { + 2 │ width: u32, + 3 │ height: u32, + 4 │ } + 5 │ + 6 _ │ fn main() { + 7 │ let rect1 = Rectangle { width: 30, height: 50 }; + 8 │ + 9 │ println!( + 10 ~ │ "The perimeter of the rectangle is {} pixels.", + 11 ~ │ perimeter(&rect1) + 12 │ ); + 13 │ } + 14 │ + 15 │ fn area(rectangle: &Rectangle) -> u32 { + 16 │ rectangle.width * rectangle.height + 17 │ } + 18 + │ + 19 + │ fn perimeter(rectangle: &Rectangle) -> u32 { + 20 + │ (rectangle.width + rectangle.height) * 2 + 21 + │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid,header,numbers.snapshot.txt b/tests/snapshots/output/grid,header,numbers.snapshot.txt new file mode 100644 index 00000000..e842b5cb --- /dev/null +++ b/tests/snapshots/output/grid,header,numbers.snapshot.txt @@ -0,0 +1,25 @@ +───────┬──────────────────────────────────────────────────────────────────────── + │ File: sample.rs +───────┼──────────────────────────────────────────────────────────────────────── + 1 │ struct Rectangle { + 2 │ width: u32, + 3 │ height: u32, + 4 │ } + 5 │ + 6 │ fn main() { + 7 │ let rect1 = Rectangle { width: 30, height: 50 }; + 8 │ + 9 │ println!( + 10 │ "The perimeter of the rectangle is {} pixels.", + 11 │ perimeter(&rect1) + 12 │ ); + 13 │ } + 14 │ + 15 │ fn area(rectangle: &Rectangle) -> u32 { + 16 │ rectangle.width * rectangle.height + 17 │ } + 18 │ + 19 │ fn perimeter(rectangle: &Rectangle) -> u32 { + 20 │ (rectangle.width + rectangle.height) * 2 + 21 │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid,header.snapshot.txt b/tests/snapshots/output/grid,header.snapshot.txt new file mode 100644 index 00000000..a6fbca2d --- /dev/null +++ b/tests/snapshots/output/grid,header.snapshot.txt @@ -0,0 +1,25 @@ +───────┬──────────────────────────────────────────────────────────────────────── + │ File: sample.rs +───────┼──────────────────────────────────────────────────────────────────────── + │ struct Rectangle { + │ width: u32, + │ height: u32, + │ } + │ + │ fn main() { + │ let rect1 = Rectangle { width: 30, height: 50 }; + │ + │ println!( + │ "The perimeter of the rectangle is {} pixels.", + │ perimeter(&rect1) + │ ); + │ } + │ + │ fn area(rectangle: &Rectangle) -> u32 { + │ rectangle.width * rectangle.height + │ } + │ + │ fn perimeter(rectangle: &Rectangle) -> u32 { + │ (rectangle.width + rectangle.height) * 2 + │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid,numbers.snapshot.txt b/tests/snapshots/output/grid,numbers.snapshot.txt new file mode 100644 index 00000000..0186dac3 --- /dev/null +++ b/tests/snapshots/output/grid,numbers.snapshot.txt @@ -0,0 +1,22 @@ + 1 │ struct Rectangle { + 2 │ width: u32, + 3 │ height: u32, + 4 │ } + 5 │ + 6 │ fn main() { + 7 │ let rect1 = Rectangle { width: 30, height: 50 }; + 8 │ + 9 │ println!( + 10 │ "The perimeter of the rectangle is {} pixels.", + 11 │ perimeter(&rect1) + 12 │ ); + 13 │ } + 14 │ + 15 │ fn area(rectangle: &Rectangle) -> u32 { + 16 │ rectangle.width * rectangle.height + 17 │ } + 18 │ + 19 │ fn perimeter(rectangle: &Rectangle) -> u32 { + 20 │ (rectangle.width + rectangle.height) * 2 + 21 │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/grid.snapshot.txt b/tests/snapshots/output/grid.snapshot.txt new file mode 100644 index 00000000..2adebd8f --- /dev/null +++ b/tests/snapshots/output/grid.snapshot.txt @@ -0,0 +1,22 @@ + │ struct Rectangle { + │ width: u32, + │ height: u32, + │ } + │ + │ fn main() { + │ let rect1 = Rectangle { width: 30, height: 50 }; + │ + │ println!( + │ "The perimeter of the rectangle is {} pixels.", + │ perimeter(&rect1) + │ ); + │ } + │ + │ fn area(rectangle: &Rectangle) -> u32 { + │ rectangle.width * rectangle.height + │ } + │ + │ fn perimeter(rectangle: &Rectangle) -> u32 { + │ (rectangle.width + rectangle.height) * 2 + │ } +───────┴──────────────────────────────────────────────────────────────────────── diff --git a/tests/snapshots/output/header,numbers.snapshot.txt b/tests/snapshots/output/header,numbers.snapshot.txt new file mode 100644 index 00000000..c1dcf63a --- /dev/null +++ b/tests/snapshots/output/header,numbers.snapshot.txt @@ -0,0 +1,22 @@ +File: sample.rs + 1 struct Rectangle { + 2 width: u32, + 3 height: u32, + 4 } + 5 + 6 fn main() { + 7 let rect1 = Rectangle { width: 30, height: 50 }; + 8 + 9 println!( + 10 "The perimeter of the rectangle is {} pixels.", + 11 perimeter(&rect1) + 12 ); + 13 } + 14 + 15 fn area(rectangle: &Rectangle) -> u32 { + 16 rectangle.width * rectangle.height + 17 } + 18 + 19 fn perimeter(rectangle: &Rectangle) -> u32 { + 20 (rectangle.width + rectangle.height) * 2 + 21 } diff --git a/tests/snapshots/output/header.snapshot.txt b/tests/snapshots/output/header.snapshot.txt new file mode 100644 index 00000000..d0e167a9 --- /dev/null +++ b/tests/snapshots/output/header.snapshot.txt @@ -0,0 +1,22 @@ +File: sample.rs +struct Rectangle { + width: u32, + height: u32, +} + +fn main() { + let rect1 = Rectangle { width: 30, height: 50 }; + + println!( + "The perimeter of the rectangle is {} pixels.", + perimeter(&rect1) + ); +} + +fn area(rectangle: &Rectangle) -> u32 { + rectangle.width * rectangle.height +} + +fn perimeter(rectangle: &Rectangle) -> u32 { + (rectangle.width + rectangle.height) * 2 +} diff --git a/tests/snapshots/output/numbers.snapshot.txt b/tests/snapshots/output/numbers.snapshot.txt new file mode 100644 index 00000000..198f0355 --- /dev/null +++ b/tests/snapshots/output/numbers.snapshot.txt @@ -0,0 +1,21 @@ + 1 struct Rectangle { + 2 width: u32, + 3 height: u32, + 4 } + 5 + 6 fn main() { + 7 let rect1 = Rectangle { width: 30, height: 50 }; + 8 + 9 println!( + 10 "The perimeter of the rectangle is {} pixels.", + 11 perimeter(&rect1) + 12 ); + 13 } + 14 + 15 fn area(rectangle: &Rectangle) -> u32 { + 16 rectangle.width * rectangle.height + 17 } + 18 + 19 fn perimeter(rectangle: &Rectangle) -> u32 { + 20 (rectangle.width + rectangle.height) * 2 + 21 } diff --git a/tests/snapshots/output/plain.snapshot.txt b/tests/snapshots/output/plain.snapshot.txt new file mode 100644 index 00000000..d66799f0 --- /dev/null +++ b/tests/snapshots/output/plain.snapshot.txt @@ -0,0 +1,21 @@ +struct Rectangle { + width: u32, + height: u32, +} + +fn main() { + let rect1 = Rectangle { width: 30, height: 50 }; + + println!( + "The perimeter of the rectangle is {} pixels.", + perimeter(&rect1) + ); +} + +fn area(rectangle: &Rectangle) -> u32 { + rectangle.width * rectangle.height +} + +fn perimeter(rectangle: &Rectangle) -> u32 { + (rectangle.width + rectangle.height) * 2 +}