Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Bug in assertFileContent function #984
Minimum Steps to Reproduce
An error should be reported since the expected file and actual file don't match (the expected file is empty).
An error is not being reported. The problem is the main expected/actual comparison loop (taken from line 184-204 of
The problem arises when
Having thought about this issue more carefully, I see that the goal of the loop in question is to check lines of the expected output against corresponding lines of the actual output until there are no more lines of expected output. Doing it this way allows us to only check, say, the first half of the actual output if that's all we're interested in (we just save the first half of the actual output as the expected output).
The problem with this approach is that if we forget to provide expected output (i.e. if expected output is an empty file), the
There are 15 JUnit failures that seem to be caused by empty expected output files.
@vahdat-ab Here's a screenshot showing which tests failed. I haven't looked into all of them, but I think they're due to empty files.
I started looking into the JavaInheritenceTemplate test cases. It doesn't look like the interface methods are showing up in the classes that implement them (I tried adding a class that extends ISecondChild and didn't see any methods in class body). It also looks like at least one of the interfaces in the .ump file associated with that test contain attributes, which I believe is invalid syntax.
Yes, you are right. When a class implements the interface