uqbar-project / wollok

Wollok Programming Language
GNU General Public License v3.0
60 stars 16 forks source link

Doesn't check a repeated class name if you don't define a package #1027

Closed Juancete closed 7 years ago

Juancete commented 8 years ago

If you do somethig like

>>>aFile.wlk

class Bleh {
...
}
class Bleh {
...
}

Doesn't check a repeated class name. But if you do

>>>aFile.wlk

package aPackage {
   class Bleh {
   ...
   }
   class Bleh {
   ...
   }
}

Shows an error.

Juancete commented 8 years ago

Heee.... problems!

I can run Xpect test in eclipse a file at once. I want to make a test and i found in DuplicatedChecksTestCase.wlk.xt.failing the right place. But is a .failing extencion. I guess it is to skip this test. I'm trying to do my test in a new file but doesn't like to Xpect. is it something about warnings? @javierfernandes ?

Juancete commented 8 years ago

and I could run xpect test. :D

javierfernandes commented 8 years ago

Sorry I didn't get the issue.

Yes, I believe that the "failing" extension was to ignore them.

What is your issue ?

Beware that I think that those "failing" tests where bound to a different java class (check on top of the test there's a SETUP "macro", where you bind the file to the junit test). You should use one that's not the same as those for failing but for the ones that actually work :)

On Sat, Oct 22, 2016 at 1:44 AM, Juancete notifications@github.com wrote:

Heee.... problems!

I can run Xpect test in eclipse a file at once. I want to make a test and i found in DuplicatedChecksTestCase.wlk.xt.failing the right place. But is a .failing extencion. I guess it is to skip this test. I'm trying to do my test in a new file but doesn't like to Xpect. is it something about warnings? @javierfernandes https://github.com/javierfernandes ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/1027#issuecomment-255507289, or mute the thread https://github.com/notifications/unsubscribe-auth/AEORWJ4kR19i1HPCJhh0gjjXOzYbmbA7ks5q2ZS2gaJpZM4KbIDQ .

Juancete commented 8 years ago

It's a syntax error. In the .failing files the expectations are declared like

// XPECT errors -=>

but is

// XPECT errors -->

And have the same setup i think

/* XPECT_SETUP org.uqbar.project.wollok.tests.xpect.WollokXPectTest END_SETUP */

is that right?

javierfernandes commented 8 years ago

I'm not sure what they are for.

I've seen something similar before to assert for 1 or many expected errors, like a list. But not that one "-=>"

On Tue, Oct 25, 2016 at 4:44 PM, Juancete notifications@github.com wrote:

It's a syntax error. In the .failing files the expectations are declared like

// XPECT errors -=>

but is

// XPECT errors -->

And have the same setup i think

/* XPECT_SETUP org.uqbar.project.wollok.tests.xpect.WollokXPectTest END_SETUP */

is that right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/1027#issuecomment-256154415, or mute the thread https://github.com/notifications/unsubscribe-auth/AEORWEMIrtHx9uKUXYbmF_lgKyOxVyjhks5q3lwFgaJpZM4KbIDQ .

Juancete commented 8 years ago

check this file.

For one or more expectations use this syntax: /* XPECT issues ---

In this file i found the old wollok syntax like new for a constructor. This is not updated. Is there a complete documentation for Xpect? i can't found anyone on the site.