(t *testing.T, expectedJoinCommand ast.JoinCommand, actualJoinCommand ast.JoinCommand)
| 1064 | } |
| 1065 | |
| 1066 | func testJoinCommands(t *testing.T, expectedJoinCommand ast.JoinCommand, actualJoinCommand ast.JoinCommand) { |
| 1067 | |
| 1068 | if expectedJoinCommand.Token.Type != actualJoinCommand.Token.Type { |
| 1069 | t.Errorf("Expecting Token TokenType: %q, got: %q", expectedJoinCommand.Token.Type, actualJoinCommand.Token.Type) |
| 1070 | } |
| 1071 | if expectedJoinCommand.Token.Literal != actualJoinCommand.Token.Literal { |
| 1072 | t.Errorf("Expecting Token Literal: %s, got: %s", expectedJoinCommand.Token.Literal, actualJoinCommand.Token.Literal) |
| 1073 | } |
| 1074 | if expectedJoinCommand.Name != actualJoinCommand.Name { |
| 1075 | t.Errorf("Expecting Name to has a value: %s, got: %s", expectedJoinCommand.Name, actualJoinCommand.Name) |
| 1076 | } |
| 1077 | if !expressionsAreEqual(actualJoinCommand.Expression, expectedJoinCommand.Expression) { |
| 1078 | t.Errorf("Actual expression is not equal to expected one.\nActual: %#v\nExpected: %#v", actualJoinCommand.Expression, expectedJoinCommand.Expression) |
| 1079 | } |
| 1080 | } |
| 1081 | func expressionsAreEqual(first ast.Expression, second ast.Expression) bool { |
| 1082 | |
| 1083 | booleanExpression, booleanExpressionIsValid := first.(*ast.BooleanExpression) |
no test coverage detected