-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature removing constructors (#1978)
* Fix #1916 Class initialization including mixins * First step: removing WConstructor from class & removing compiler errors * WIP: fixing tests * Fix all xpect tests * Fixing tests wollok-language - pointing to new branch * Removing WConstructor, WSelf & WSuperDelegatingConstructorCall from xtext definition * Removing fixture - build * Removing fixture - fixing tests * Fixing initialize method bug * Removing validation for override and super in initialize method * WIP - specification pending * Adding lazy definition of variables & initializers * Removing println * New wollok-language version * Updating wollok language commit with last changes * Changes requested by @nscarcella * Fixing unit tests * Fix Mixin validation for uninitialized references * Fix mixed method container instantiation for named parameters * Fixing named object passing parameters to parent class * Fix named object test * Refactored & added object literal validation * Adding more tests * Solving lazy problems * Moving tests to wollok-language * Removing duplicated tests * Enhancing initialization attributes for Named Object & Object literals * Merging last changes from wollok-language/master * Moving sanity tests to Wollok Xtext until we discuss lazy feature = uqbar-project/wollok-language#90 * Upgrading wollok-language * Pointing to wollok-language merged version => release 3.0.0
- Loading branch information
Showing
90 changed files
with
698 additions
and
3,622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...ests/src/org/uqbar/project/wollok/tests/formatter/ConstructorCallsFormatterTestCase.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package org.uqbar.project.wollok.tests.formatter | ||
|
||
import org.eclipse.xtext.testing.InjectWith | ||
import org.eclipse.xtext.testing.XtextRunner | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.uqbar.project.wollok.tests.injectors.WollokTestInjectorProvider | ||
|
||
@RunWith(XtextRunner) | ||
@InjectWith(WollokTestInjectorProvider) | ||
class ConstructorCallsFormatterTestCase extends AbstractWollokFormatterTestCase { | ||
|
||
@Test | ||
def void constructorCallFormatting() throws Exception { | ||
assertFormatting(''' | ||
class A { var a | ||
var b = 2 var c var d | ||
} | ||
class B { | ||
method buildA() { | ||
new A( a | ||
= | ||
200 | ||
, | ||
b = "Hello" | ||
, | ||
c = new Date() | ||
, d=#{1 , 8} ) | ||
} | ||
''', | ||
''' | ||
class A { | ||
var a | ||
var b = 2 | ||
var c | ||
var d | ||
} | ||
class B { | ||
method buildA() { | ||
new A(a = 200, b = "Hello", c = new Date(), d = #{ 1, 8 }) | ||
} | ||
} | ||
''') | ||
} | ||
} |
Oops, something went wrong.