Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 6 (100.0%) | 152 (100.0%) | 25.3 |
gehmane | 2 (33.3%) | 104 (68.4%) | 52.0 |
tshishikub | 4 (66.7%) | 48 (31.6%) | 12.0 |
Added a few more tests to SLogoParserTest
1 lines of code changed in 1 file:
Did some refactoring of Parsing code so that have less duplicated code.
- mainly created methods to parse instruction parameters (in SLogoParser). This code showed up in a lot of places, so it was good to make into methods.
Added a lot of tests to SLogoParserTest
Added a few methods to Turtle class so that the Parsing code does less/knows less about Turtle's innerworkings. (Required adding "notifyListeners" to some of Turtle's methods)
Cleaned up code: removed debugging statements
55 lines of code changed in 1 file:
Made some major and minor changes
Created instruction hierarchy:
- ConditionalInstructions
- return 1 or 0 when evaluated
- NumericInstructions
- return a number when evaluated
- OneParameterInstructions
- have a parameter (often numeric) that needs to be evaluated
Made lots of changes because of the above changes. Needed to update the parsers and the instruction classes.
Added some methods to the Turtle class so that the Instructions have less knowledge of the Turtle's innerworkings.
Moved SubroutineFactory to slogo.language package instead of slogo.expression
Updated comments in many instructions (use the Javadoc in the evaluate)
43 lines of code changed in 2 files:
Testing added for the getTowardsHeading method
12 lines of code changed in 1 file:
Minor change to SLogoParserTest
- made Turtle object accessible to all tests.
3 lines of code changed in 1 file:
little changes. renaming some classes (like equal) so that the tokens are recognized.
19 lines of code changed in 2 files:
updated SLogoParserTest
2 lines of code changed in 1 file:
Modified SLogoParser so that the parse method (now called "interpret") returns the value from executing the last statement.
- updated related methods as appropriate
Added tests to SLogoParserTest for subroutines
Modified some arithmetic-related SLogoParserTests to leverage that interpret returns a result, so now uses the assert statements to verify the results
Modified Main
- to use SLogoParser's new interpret method
- does not throw runtime nullpointer exceptions if the result of executing the command is null.
55 lines of code changed in 1 file:
Added more tests to test the SLogoParser
20 lines of code changed in 1 file:
Test cases in JUnit for the Turtle class in slogo.gui
92 lines of code changed in 1 file:
Major: Changed from using "Expression" superclass to using "GrammarElement" super class.
- allows handling instructions in instructions
Added a JUnit test case for SLogoParser (more tests should be added)
Reorganized the Instructions into packages so easier to find.
- Not possible for Tokens because of use of reflection
Added Quotient to InstructionProps file
Updated the Documentation
Other minor changes to code
63 lines of code changed in 2 files:
test for Forward class.
27 lines of code changed in 1 file: