6. Project Introduction(3)
CalculateChineseNameProcessor
● NameProfile
○ Data structure
● ILoadSettings
○ Loading config from text
● IDataProducer
○ Produce initial data (A lot of NameProfile)
● IRulefilter
○ Each Rulefilter filter out not-matching NameProfiles
● MainProcessor
○ Run all process
8. Implement Process
Steps
1, Design one Interface
2, Write the Unit Test
3, Write the production code
4, Modify interface or test to match the code.
5, Repeat 1,2,3,4 to next feature.
11. Notes
● I do not test private code, but I test the public
code which call private code
● TEST vs TEST_F
● SetUpTestCase, TearDownTestCase vs
SetUp, TearDown
● ::testing::FLAGS_gtest_output = "xml:" =>log
12. Notes(2)
● Each unit test pass the test, but it test error
when I combine them
○ Got 1 bug
● Test sample is too few to test all conditions
○ Miss some conditions