From 4d1aa8fd366123d00c33c1a9988f01e98b980da7 Mon Sep 17 00:00:00 2001 From: Kaustubh Khavnekar Date: Mon, 14 Oct 2024 22:32:39 -0400 Subject: [PATCH] Add a comment to describe new testcase --- test/pgn_test.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/pgn_test.dart b/test/pgn_test.dart index 2aac80e..720ec16 100644 --- a/test/pgn_test.dart +++ b/test/pgn_test.dart @@ -290,6 +290,12 @@ the players are also trying to learn as much as possible about the opponent's pr ); }); + /// Test for scenario where + /// a. '{' is the last character on a line + /// b. a '}' character appears somewhere before the '{' on that same line + /// (line 22 of wcc_2023_eolcomment.pgn) + /// + /// This tests a fix which avoids an infinite loop in the described scenario. test('pgn file - WCC 2023 - comment before newline', () { final String data = File('./data/wcc_2023_eolcomment.pgn').readAsStringSync(); @@ -297,6 +303,12 @@ the players are also trying to learn as much as possible about the opponent's pr expect(games.length, 3); }); + /// Test for scenario where + /// a. '{' is the last character on a line + /// b. a '}' character appears somewhere before the '{' on that same line + /// (line 22 of wcc_2023_eolcomment.pgn) + /// + /// This tests a fix which avoids an infinite loop in the described scenario. test('pgn file - kasparov-deep-blue-1997', () { final String data = File('./data/kasparov-deep-blue-1997.pgn').readAsStringSync();