Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more tests #30

Closed
tpetricek opened this issue Oct 15, 2013 · 1 comment
Closed

Add more tests #30

tpetricek opened this issue Oct 15, 2013 · 1 comment

Comments

@tpetricek
Copy link
Member

There are now separate test projects, but most of them are still just exe files that you can run to test things by hand. We should turn those into unit tests...

The only one that has the right structure is CodeFormat.Tests, so this can be used as an inspiration how the structure should look.

I'd welcome any contributions here :-) feel free to turn other projects in tests folder into proper Library projects that reference NUnit, include FsUnit.fs and contain some actual tests!

For Markdown, it would be nice to compare against some existing tools (there are some sample outputs in Benchmarks folder) but we do not necessarily have to do exactly the same thing...

@dungpa
Copy link
Contributor

dungpa commented Oct 15, 2013

What kinds of tests do you have in mind?

I suppose we can turn pairs of input and output files into tests but it's restrictive since output formats may change and output files should fulfill certain properties rather than be fixed into some values.

We really need tests for Markdown parser. If we add pretty printing for ASTs, we can test the following property on a vast number of inputs:

 parse >> print >> parse = parse

dungpa added a commit to dungpa/FSharp.Formatting that referenced this issue Oct 19, 2013
Solve part of fsprojects#30
Current stats: 54 passed and 15 failed tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants