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 property tests #88

Merged
merged 3 commits into from
Jan 2, 2017
Merged

Conversation

ypaq
Copy link
Contributor

@ypaq ypaq commented Jan 1, 2017

Property tests now generate two type declarations, the second one may use the name of the first.

You can now adjust the number of tests with NUMTESTS=10000 rebar3 ct. The default is 1000 test cases.

@ypaq ypaq force-pushed the ypaq-more-prop-tests branch 4 times, most recently from 1efebcd to 3a2ac51 Compare January 2, 2017 05:21
to_binary({construct, Constructor, Of}) ->
[to_binary(Constructor), to_binary(Of)];
to_binary({union, OfTypes}) ->
lists:join($|, [to_binary(Type) || Type <- OfTypes]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lists:join is not available in erlang 18.

@ypaq ypaq force-pushed the ypaq-more-prop-tests branch 3 times, most recently from bbdfe6c to 73cdb4e Compare January 2, 2017 06:24
@ypaq ypaq force-pushed the ypaq-more-prop-tests branch 2 times, most recently from 75d5bde to 36e0cad Compare January 2, 2017 18:09
to_binary({list, Of}) ->
[<<"list">>, to_binary(Of)];
to_binary({map, KeyType, ValueType}) ->
[<<"map">>, $(, to_binary(KeyType), $), to_binary(ValueType)];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently forcing brackets around the key type of a map.

@ypaq ypaq changed the title [WIP] Add more property tests Add more property tests Jan 2, 2017
@j14159
Copy link
Collaborator

j14159 commented Jan 2, 2017

There are a couple of references to R18 in README.md - mind updating those to R19 in this PR as well?

@ypaq
Copy link
Contributor Author

ypaq commented Jan 2, 2017

Done

@j14159
Copy link
Collaborator

j14159 commented Jan 2, 2017

Thanks for this!

@j14159 j14159 merged commit 8effc8c into alpaca-lang:master Jan 2, 2017
@ypaq ypaq deleted the ypaq-more-prop-tests branch January 2, 2017 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants