File: Remove-comparison-of-error-message-in-test.patch

package info (click to toggle)
adql 2.0~beta%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,560 kB
  • sloc: java: 21,916; sh: 132; makefile: 17
file content (32 lines) | stat: -rw-r--r-- 1,625 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Ole Streicher <olebole@debian.org>
Date: Sun, 14 Jul 2019 11:02:48 +0200
Subject: Remove comparison of error message in test

The errormessages differ slightly between different parser version,
so comparing them with a fixed string is not robust and fails on Debian
---
 ADQLLib/test/adql/parser/TestADQLParser.java | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/ADQLLib/test/adql/parser/TestADQLParser.java b/ADQLLib/test/adql/parser/TestADQLParser.java
index 9cb136f..051a834 100644
--- a/ADQLLib/test/adql/parser/TestADQLParser.java
+++ b/ADQLLib/test/adql/parser/TestADQLParser.java
@@ -630,8 +630,6 @@ public class TestADQLParser {
 				(new ADQLParser(version)).parseQuery("select gr\u00e9gory FROM aTable");
 			} catch(Throwable t) {
 				assertEquals(ParseException.class, t.getClass());
-				assertTrue(t.getMessage().startsWith("Incorrect character encountered at l.1, c.10: "));
-				assertTrue(t.getMessage().endsWith("Possible cause: a non-ASCI/UTF-8 character (solution: remove/replace it)."));
 			}
 
 			/* Un-finished double/single quoted string: */
@@ -639,8 +637,6 @@ public class TestADQLParser {
 				(new ADQLParser(version)).parseQuery("select \"stuff FROM aTable");
 			} catch(Throwable t) {
 				assertEquals(ParseException.class, t.getClass());
-				assertTrue(t.getMessage().startsWith("Incorrect character encountered at l.1, c.26: <EOF>"));
-				assertTrue(t.getMessage().endsWith("Possible cause: a string between single or double quotes which is never closed (solution: well...just close it!)."));
 			}
 
 			// But in a string, delimited identifier or a comment, it is fine: