(t *testing.T)
| 1210 | } |
| 1211 | |
| 1212 | func TestMod(t *testing.T) { |
| 1213 | src := `<? $a % $b;` |
| 1214 | |
| 1215 | expected := &node.Root{ |
| 1216 | Position: &position.Position{ |
| 1217 | StartLine: 1, |
| 1218 | EndLine: 1, |
| 1219 | StartPos: 3, |
| 1220 | EndPos: 11, |
| 1221 | }, |
| 1222 | Stmts: []node.Node{ |
| 1223 | &stmt.Expression{ |
| 1224 | Position: &position.Position{ |
| 1225 | StartLine: 1, |
| 1226 | EndLine: 1, |
| 1227 | StartPos: 3, |
| 1228 | EndPos: 11, |
| 1229 | }, |
| 1230 | Expr: &binary.Mod{ |
| 1231 | Position: &position.Position{ |
| 1232 | StartLine: 1, |
| 1233 | EndLine: 1, |
| 1234 | StartPos: 3, |
| 1235 | EndPos: 10, |
| 1236 | }, |
| 1237 | Left: &expr.Variable{ |
| 1238 | Position: &position.Position{ |
| 1239 | StartLine: 1, |
| 1240 | EndLine: 1, |
| 1241 | StartPos: 3, |
| 1242 | EndPos: 5, |
| 1243 | }, |
| 1244 | VarName: &node.Identifier{ |
| 1245 | Position: &position.Position{ |
| 1246 | StartLine: 1, |
| 1247 | EndLine: 1, |
| 1248 | StartPos: 3, |
| 1249 | EndPos: 5, |
| 1250 | }, |
| 1251 | Value: "a", |
| 1252 | }, |
| 1253 | }, |
| 1254 | Right: &expr.Variable{ |
| 1255 | Position: &position.Position{ |
| 1256 | StartLine: 1, |
| 1257 | EndLine: 1, |
| 1258 | StartPos: 8, |
| 1259 | EndPos: 10, |
| 1260 | }, |
| 1261 | VarName: &node.Identifier{ |
| 1262 | Position: &position.Position{ |
| 1263 | StartLine: 1, |
| 1264 | EndLine: 1, |
| 1265 | StartPos: 8, |
| 1266 | EndPos: 10, |
| 1267 | }, |
| 1268 | Value: "b", |
| 1269 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…