Skip to content

Commit

Permalink
Fixes to failing tests
Browse files Browse the repository at this point in the history
Resulting to the modifications of a463288
  • Loading branch information
sylvainhalle committed Feb 5, 2024
1 parent 6236993 commit 27a6157
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
12 changes: 1 addition & 11 deletions Core/src/ca/uqac/lif/cep/io/ReadLines.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
BeepBeep, an event stream processor
Copyright (C) 2008-2023 Sylvain Hallé
Copyright (C) 2008-2024 Sylvain Hallé
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -41,16 +41,6 @@ public class ReadLines extends ReadTokens
*/
protected final Scanner m_scanner;

/**
* Whether to add a carriage return at the end of each line
*/
protected boolean m_addCrlf = false;

/**
* Whether to trim each text line from leading and trailing spaces
*/
protected boolean m_trim = false;

/**
* Creates a new file reader from an input stream
*
Expand Down
12 changes: 7 additions & 5 deletions CoreTest/src/ca/uqac/lif/cep/util/SetsTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
BeepBeep, an event stream processor
Copyright (C) 2008-2023 Sylvain Hallé
Copyright (C) 2008-2024 Sylvain Hallé
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -53,7 +53,8 @@ public void testSetsPut1()
assertTrue(m1 == m2);
assertEquals(2, m1.size());
pi.reset();
assertEquals(0, m1.size());
// A new set has been created, so m1 is unchanged
assertEquals(2, m1.size());
}

@Test
Expand Down Expand Up @@ -105,10 +106,11 @@ public void testReset1()
pi.reset();
p.push("bar");
Set<?> set2 = (Set<?>) q.remove();
assertTrue(set1 == set2); // Both refer to the same collection
assertFalse(set1 == set2); // A new set has been created
assertEquals(1, set2.size());
assertTrue(set1.contains("bar"));
assertFalse(set1.contains("foo"));
assertFalse(set1.contains("bar"));
assertTrue(set2.contains("bar"));
assertTrue(set1.contains("foo")); // set1 is unchanged
}

@Test
Expand Down
8 changes: 5 additions & 3 deletions CoreTest/src/ca/uqac/lif/cep/util/UtilTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
BeepBeep, an event stream processor
Copyright (C) 2008-2019 Sylvain Hallé
Copyright (C) 2008-2024 Sylvain Hallé
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -408,7 +408,8 @@ public void testMapsPut1()
assertTrue(m1 == m2);
assertEquals(2, m1.size());
pi.reset();
assertEquals(0, m1.size());
// A new set has been created, so m1 is unchanged
assertEquals(2, m1.size());
}

@Test
Expand All @@ -427,7 +428,8 @@ public void testMapsPut2()
assertTrue(m1 == m2);
assertEquals(2, m1.size());
pi.reset();
assertEquals(0, m1.size());
// A new set has been created, so m1 is unchanged
assertEquals(2, m1.size());
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 27a6157

Please sign in to comment.