Thread overview | |||||
---|---|---|---|---|---|
|
August 05, 2019 lexer.d and unittests | ||||
---|---|---|---|---|
| ||||
https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lexer.d Despite having unittests, it is only 30% covered, which is simply terrible. Anyone care to add more coverage tests? |
August 07, 2019 Re: lexer.d and unittests | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 2019-08-06 01:36, Walter Bright wrote: > https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lexer.d > > Despite having unittests, it is only 30% covered, which is simply terrible. Anyone care to add more coverage tests? I highly recommend adding tests like these [1]. Some more examples [2] [3]. [1] https://github.com/dlang/dmd/tree/master/test/unit/lexer [2] https://github.com/dlang/dmd/pull/10010 [3] https://github.com/dlang/dmd/pull/9963 -- /Jacob Carlborg |
August 07, 2019 Re: lexer.d and unittests | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On 8/7/2019 2:52 AM, Jacob Carlborg wrote: > On 2019-08-06 01:36, Walter Bright wrote: >> https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lexer.d >> >> Despite having unittests, it is only 30% covered, which is simply terrible. Anyone care to add more coverage tests? > > I highly recommend adding tests like these [1]. Some more examples [2] [3]. > > [1] https://github.com/dlang/dmd/tree/master/test/unit/lexer > [2] https://github.com/dlang/dmd/pull/10010 > [3] https://github.com/dlang/dmd/pull/9963 > I was able to fully unittest the Warp lexer without building a test harness, just using basic unittests: https://github.com/facebookarchive/warp/blob/master/lexer.d#L852 In fact, Warp was the most fully unittested project I've ever done, and it had remarkably few bugs found in the field. |
Copyright © 1999-2021 by the D Language Foundation