Skip to content

Test for functional argument passing #336

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

Merged
merged 3 commits into from
May 13, 2019

Conversation

directionless
Copy link
Contributor

Tests for #322

(And a .gitignore addition for llvm)

@directionless
Copy link
Contributor Author

I suspect this should fail tests, I think #322 merged into dev, not master.

@deadprogram deadprogram changed the base branch from master to dev May 9, 2019 07:24
@deadprogram
Copy link
Member

Hi @directionless thanks for the PR I changed the branch for it to dev as mentioned here: https://github.com/tinygo-org/tinygo/blob/master/CONTRIBUTING.md#how-to-use-our-github-repository

@aykevl
Copy link
Member

aykevl commented May 9, 2019

Can you merge these tests in calls.go? By having fewer larger tests, the time to run them is reduced (certainly as long as #285 is not finished).
Also, can you use println instead of fmt.Println? By avoiding this fmt package, tests are much faster to execute because they compile faster. This test isn't about the fmt package but only about named functions.

I care a lot about fast tests because the slower the test, the less likely you are to run them.

@directionless
Copy link
Contributor Author

Sure. I'm happy to merge this with calls.go.

My bias is also to faster tests, though in my other go projects I haven't found fewer files to be as much of a win. But I also use a lot of parallelization. I tossed a bunch of stuff into #337 around that. On my machine, it seems to cut the test time in half. I'm curious what you think of that approach.

Tests for tinygo-org#322

(And a .gitignore addition for llvm)
@directionless directionless force-pushed the seph/testfunctionalargs branch from 3e6fafb to 9b2d351 Compare May 9, 2019 21:15
@directionless directionless force-pushed the seph/testfunctionalargs branch from 0de22ac to f00fe8b Compare May 9, 2019 21:23
@deadprogram
Copy link
Member

Thanks for the additional tests @directionless now merging.

@deadprogram deadprogram merged commit a4cd3bb into tinygo-org:dev May 13, 2019
@aykevl
Copy link
Member

aykevl commented May 13, 2019

Technically varargs are a matter for the frontend (https://godoc.org/golang.org/x/tools/go/ssa) because on the Go SSA level, all varargs are replaced with slices already so doesn't really need to care about this, but it's good to test it anyway to be sure.

torntrousers pushed a commit to HarringayMakerSpace/tinygo that referenced this pull request May 18, 2019
* Test for functional argument passing
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

3 participants