munificent / magpie

The Magpie programming language
http://magpie-lang.org
Other
360 stars 34 forks source link

test/functions/implicit_parameters.mag fails #27

Open Sh4rK opened 11 years ago

Sh4rK commented 11 years ago

The order of implicit parameters is messed up in some cases (Windows 8 x64 Release build):

FAIL: ..\test\functions\implicit_parameters.mag
      Expected output "two params" on line 6 and got " paramstwo".
      Expected output "three params" on line 7 and got "params three".
      Expected output "a foo(b, c)" on line 39 and got "c foo(a, b)".
      Expected output "while" on line 114 and got "true".

239 tests passed. 1 tests failed. ←[2K
Skipped 40 tests.

(btw, why are some tests skipped?)

munificent commented 11 years ago

That failure is really strange. That isn't a part of the codebase that I would expect to have platform-specific behavior. There must be some bug in there. If you get a chance to look into that would be great. Otherwise, I'll have to wait until I have time to try Magpie out on a Windows machine myself. That test runs fine on my Mac.

Skipped tests indicate tests that exercise something that's known to not be working right now. For example, there are a bunch of tests that rely on field initializers, which are not implemented in the C++ VM yet. Those tests are skipped.

Marking them skip gives us a way to distinguish between new unexpected test failures versus ones that we know aren't working right now. If you run test.py from a fresh checkout, you should never see failures, just skips.

As the implementation matures, those skipped tests should be re-enabled once they can pass.

I just pushed a change that associates a reason with each skipped test. Now when you run test.py, you get some feedback about why various tests are skipped.

munificent commented 11 years ago

Can you file a separate ticket for \test\event\exit_while_fiber_sleeping.mag? That's almost definitely an unrelated issue (and possibly something in libuv itself, though I'm not sure).

Sh4rK commented 11 years ago

Thanks for the explanation!

About the test failure, I can look into it, can you tell me where should I start looking?

munificent commented 11 years ago

I wrote a little guide here that may help a bit. For this specific issue, I'd try to see where it's actually exiting since that exit code looks like such an odd number. That will help us narrow down what's going wrong. Since this is a platform-specific error, it's likely something either in libuv or where we're using libuv incorrectly.

Sh4rK commented 11 years ago

I think your last comment is for the other issue.

And by my last comment I meant where is the implicit argument handling code :D

munificent commented 11 years ago

Oh, heh. It's just a parser transform. See here.