Skip to content

Commit 3bf0c53

Browse files
authored
test: run three tests that had no @test (#2963)
addTest, multiplyTest and testTableAliasIssue311_2 never ran. Two of them could not pass as written, so their expectations now match what Multiplication.multiply and Column.getFullyQualifiedName return.
1 parent 1e682d1 commit 3bf0c53

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/test/java/net/sf/jsqlparser/expression/operators/arithmetic/ConcatTest.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ void concatTest() {
3434
Assertions.assertEquals("NULL", expression.toString());
3535
}
3636

37+
@Test
3738
void addTest() {
3839
Expression expression = Addition.add(new LongValue(1), new LongValue(2), new LongValue(3));
3940
Assertions.assertInstanceOf(Addition.class, expression);
@@ -48,11 +49,12 @@ void addTest() {
4849
Assertions.assertEquals("NULL", expression.toString());
4950
}
5051

52+
@Test
5153
void multiplyTest() {
5254
Expression expression =
5355
Multiplication.multiply(new LongValue(1), new LongValue(2), new LongValue(3));
54-
Assertions.assertInstanceOf(Addition.class, expression);
55-
Assertions.assertEquals("1 + 2 + 3", expression.toString());
56+
Assertions.assertInstanceOf(Multiplication.class, expression);
57+
Assertions.assertEquals("1 * 2 * 3", expression.toString());
5658

5759
expression = Multiplication.multiply(new LongValue(1));
5860
Assertions.assertInstanceOf(LongValue.class, expression);

‎src/test/java/net/sf/jsqlparser/util/SelectUtilsTest.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,13 @@ public void testTableAliasIssue311() {
113113
select.toString());
114114
}
115115

116+
@Test
116117
public void testTableAliasIssue311_2() {
117118
Table table1 = new Table("mytable1");
118119
table1.setAlias(new Alias("tab1"));
119120

120121
Column col = new Column(table1, "col1");
121122
assertEquals("tab1.col1", col.toString());
122-
assertEquals("mytable.col1", col.getFullyQualifiedName());
123+
assertEquals("mytable1.col1", col.getFullyQualifiedName());
123124
}
124125
}

0 commit comments

Comments
 (0)