From 091426549221cf67214bb33a7a7a68624f7026f2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 10 Mar 2021 22:55:52 -0500 Subject: [PATCH] Fix tests after type change --- src/Editor.php | 2 +- tests/RowTest.php | 8 ++++---- tests/__snapshots__/EditorTest__testOpenPHP__1.json | 2 +- tests/__snapshots__/EditorTest__testOpen__1.json | 10 +++++----- .../__snapshots__/EditorTest__test__debugInfo__1.json | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Editor.php b/src/Editor.php index 51caa24..fe648ff 100644 --- a/src/Editor.php +++ b/src/Editor.php @@ -52,7 +52,7 @@ class Editor { */ public array $rows = []; - public bool $dirty = TRUE; + public bool $dirty = FALSE; public string $filename = ''; protected string $statusMsg = ''; protected int $statusMsgTime; diff --git a/tests/RowTest.php b/tests/RowTest.php index 800996e..9466dfc 100644 --- a/tests/RowTest.php +++ b/tests/RowTest.php @@ -60,7 +60,7 @@ class RowTest extends TestCase { $this->assertEquals('abcde', $this->row->chars); $this->assertEquals('abcde', $this->row->render); - $this->assertEquals(1, $this->editor->dirty); + $this->assertEquals(true, $this->editor->dirty); } public function testInsertCharBadOffset(): void @@ -70,7 +70,7 @@ class RowTest extends TestCase { $this->assertEquals('abc', $this->row->chars); $this->assertEquals('abc', $this->row->render); - $this->assertEquals(1, $this->editor->dirty); + $this->assertEquals(true, $this->editor->dirty); } public function testDeleteChar(): void @@ -80,7 +80,7 @@ class RowTest extends TestCase { $this->assertEquals('abcde', $this->row->chars); $this->assertEquals('abcde', $this->row->render); - $this->assertEquals(1, $this->editor->dirty); + $this->assertEquals(true, $this->editor->dirty); } public function testDeleteCharBadOffset(): void @@ -89,6 +89,6 @@ class RowTest extends TestCase { $this->row->deleteChar(5); $this->assertEquals('ab', $this->row->chars); - $this->assertEquals(0, $this->editor->dirty); + $this->assertEquals(false, $this->editor->dirty); } } \ No newline at end of file diff --git a/tests/__snapshots__/EditorTest__testOpenPHP__1.json b/tests/__snapshots__/EditorTest__testOpenPHP__1.json index c36f513..2e99e75 100644 --- a/tests/__snapshots__/EditorTest__testOpenPHP__1.json +++ b/tests/__snapshots__/EditorTest__testOpenPHP__1.json @@ -2705,7 +2705,7 @@ "idx": 122 } ], - "dirty": 0, + "dirty": false, "filename": "test.php", "syntax": { "tokens": [], diff --git a/tests/__snapshots__/EditorTest__testOpen__1.json b/tests/__snapshots__/EditorTest__testOpen__1.json index 5d09002..69ca996 100644 --- a/tests/__snapshots__/EditorTest__testOpen__1.json +++ b/tests/__snapshots__/EditorTest__testOpen__1.json @@ -2032,18 +2032,16 @@ "idx": 67 } ], - "dirty": 0, + "dirty": false, "filename": "src\/ffi.h", "syntax": { + "tokens": [], "filetype": "C", "filematch": [ ".c", ".h", ".cpp" ], - "singleLineCommentStart": "\/\/", - "multiLineCommentStart": "\/*", - "multiLineCommentEnd": "*\/", "keywords1": [ "continue", "typedef", @@ -2079,7 +2077,9 @@ "void", "#if" ], - "tokens": [], + "singleLineCommentStart": "\/\/", + "multiLineCommentStart": "\/*", + "multiLineCommentEnd": "*\/", "flags": 3 }, "tokens": [] diff --git a/tests/__snapshots__/EditorTest__test__debugInfo__1.json b/tests/__snapshots__/EditorTest__test__debugInfo__1.json index 66c0616..f08d0ec 100644 --- a/tests/__snapshots__/EditorTest__test__debugInfo__1.json +++ b/tests/__snapshots__/EditorTest__test__debugInfo__1.json @@ -7,7 +7,7 @@ "x": 0, "y": 0 }, - "dirty": 0, + "dirty": false, "filename": "", "renderX": 0, "rows": [],