3 § Final Exam Wednesday, June 14 at 1:10 pm https://registrar.calpoly.edu/spring-final-exam-schedule § Final Project Friday, June 09 (lecture Time) § Academic Holiday Monday, May 29 (lecture Time) § Project Status Report 3 Friday, May 26 (lecture Time) Schedule
7 1. Create a GUI 2. Develop a Lexer that splits and classifies words 3. A parser method for method 4. A parser method for local variables 5. A parser method for instructions 6. A parser method for input/output (println) 7. A parser method for the if condition 8. A parser method for the for loop 9. Test Cases for Lexer 10. Test Cases for Parser Issues
19 § You cannot test every possible input, parameter value, etc. So, you must think of a limited set of tests likely to expose bugs. § Think about boundary cases positive; zero; negative numbers right at the edge of an array or collection's size § Think about empty cases and error cases 0, -1, null; an empty list or array § Test behavior in combination maybe add usually works but fails after you call to remove make multiple calls; maybe the size fails the second time only Tips for Testing
20 § Test one thing at a time per test method. 10 small tests are much better than 1 test 10x as large. § Each test method should have a few (likely 1) assert statements. If you assert many things, since the first that fails will stop the test, you won't know whether a later assertion would have failed. § Torture tests are okay, but only in addition to simple tests. Trustworthy tests
Winter 2023 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.