Commit Graph

5559 Commits

Author SHA1 Message Date
ager@google.com 0bbe9566c6 Enable language and isolate tests using the dart test runner.
Refactor the test_config.dart files. Have a standard implementation
of a test suite that can be easily customized to cover all the
current suites.

R=whesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8589020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1611 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 12:25:01 +00:00
jmesserly@google.com be50531723 Treat assignment to final as an error
Fixes http://code.google.com/p/dart/issues/detail?id=329

Review URL: http://codereview.chromium.org//8586020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1603 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 05:07:11 +00:00
jmesserly@google.com 2df4bd027d Add implicit super() call
Fixes http://code.google.com/p/dart/issues/detail?id=283

Review URL: http://codereview.chromium.org//8589016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1602 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 04:04:16 +00:00
jmesserly@google.com 03fc558ef1 fix initialization of null in loops
http://code.google.com/p/dart/issues/detail?id=468

Review URL: http://codereview.chromium.org//8587021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1599 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 02:58:17 +00:00
regis@google.com 3c64ffe9a3 Support correct factory syntax in the VM as decribed in the spec.
Change the default value of --silent_warnings from true to false, so that
warnings are visible when legacy factory syntax is used.

In order to facilitate transition of libraries and user programs, legacy factory
syntax is still supported by 2 workarounds, but warnings are printed.

The first workaround allows the factory clause to omit the type
parameter list, which otherwise has to match exactly with the list of
type parameters in the factory class declaration.

The second workaround allows a factory method to omit the type
parameter list. In that case, the type parameter list of the enclosing
class is used instead.

Workarounds will be removed to enforce correct factory syntax at a later time.
Review URL: http://codereview.chromium.org//8585004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1595 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:49:04 +00:00
efortuna@google.com bb83c227fe Made changes to the test architecture so that we can run frameworks other than
just Firefox from WebDriver.
Review URL: http://codereview.chromium.org//8566021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1555 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 00:42:18 +00:00
srdjan@google.com 92f177896b Fix throwing ObjectNotClosure instead of null exception if closure is null.
Fix integer compareTo if other is a double NaN.
Fix Expect.stringEqual to accept null as arguments.
Update co19 status file.
Review URL: http://codereview.chromium.org//8528050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1539 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 18:02:12 +00:00
scheglov@google.com f53a4aa109 Report errors for default parameter values, issue 351
http://code.google.com/p/dart/issues/detail?id=351

R=zundel@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8564027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1536 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 16:58:28 +00:00
ahe@google.com f69dd219f7 Revert various changes to Link factories.
Also, hack/work around bugs in VM and Frog to get LinkFactory to work.

Review URL: http://codereview.chromium.org//8566003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1504 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-14 12:54:41 +00:00
jmesserly@google.com 5a8a4b3cce Fix dispatch on MemberSets to always go dynamic if needed.
And a bug where we'd put a dynamic toString and == on Object that conflicts with the one that is actually on Object.

Review URL: http://codereview.chromium.org//8540030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1494 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 01:32:50 +00:00
nweiz@google.com feb92073e0 Only set initializer fields as fields, not properties.
This should fix issue 422.

TBR=jimhug

Review URL: http://codereview.chromium.org//8540023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1489 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 00:17:42 +00:00
srdjan@google.com 0a87f0b9f1 FactoryNegativeTest is now correct for dartium as well.
Review URL: http://codereview.chromium.org//8491059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1483 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 23:46:00 +00:00
srdjan@google.com 1ea6e2e0de Stop building blind: report errors with factories and parametrized types.
Enable test. This CL expects the frog/leg changes to be submitted first.
Review URL: http://codereview.chromium.org//8511070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1479 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 22:23:45 +00:00
regis@google.com 8b9ebb3528 Second attempt at finalizing all classes in the VM (fix issue 364).
Review URL: http://codereview.chromium.org//8491055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1475 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 21:38:49 +00:00
srdjan@google.com 81be68ae18 Giving up on the change to report errors with factories and generic types.
This means that you will continue to have crashes in Debug mode, but you will be able to "run" in Release mode. Best solution is to get rid of generic types in Link until factories and generic types have been fully implemented. Until then we do not know what can happen when running in release mode.

Still trying to figure out how to test frog and leg correctly.
Review URL: http://codereview.chromium.org//8540013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1469 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 18:52:53 +00:00
srdjan@google.com 6ff41ed334 Require legacy form of type parameters in factories and report errors if a factory class does not have a required parametrized type (fixes crashes in VM). Fix frog code, however, there are frogs problem with --compileall:
leg/util/link_implementation.dart:38:12: error: wrong number of arguments, expected 0 but found 2
    return new Link<T>(element, this);
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
Review URL: http://codereview.chromium.org//8515024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1464 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 17:04:00 +00:00
jmesserly@google.com 488fa4dd32 Adds typechecking of return values
Also fixes places in frog where we were returning things from "void" methods.

Review URL: http://codereview.chromium.org//8534001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1443 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 02:36:15 +00:00
sigmund@google.com e024570e01 Adding frogium: a frog-chromium architecture that runs tests in chromium that
were compiled with frog.

Review URL: http://codereview.chromium.org//8523024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1440 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 02:07:02 +00:00
srdjan@google.com f61f3d99ed Dartium debug mode runs with VM in release mode.
Review URL: http://codereview.chromium.org//8469020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1438 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 01:29:14 +00:00
efortuna@google.com 87b9e83041 Adding in-browser correctness testing via selenium.
Do not, I repeat, DO NOT enable these to run by default on the buildbot yet
(Currently they do not run by default). I am checking this in in its raw state
so that my fellow frog developers can start making fixes to frog for running in
other browsers. You can run these test by running: 

Install WebDriver stuff by following these instructions:
http://code.google.com/p/selenium/wiki/PythonBindings

Then start the server:
java -jar selenium-server-standalone-2.11.0.jar -browserSessionReuse

../tools/test.py --component=webdriver --report --timeout=10 --progress=color
--mode=release language

Frog generates code that fails in Firefox, but passes in Chrome (for example). We
need to fix this eventually, but it shouldn't cause our entire tree to turn red.
Note also that to run selenium, you will need to install the selenium python
library, and ChromeDriver.
Review URL: http://codereview.chromium.org//8469016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1436 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 01:24:50 +00:00
srdjan@google.com bc3a18b330 Fix test.
Review URL: http://codereview.chromium.org//8523017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1433 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:45:31 +00:00
srdjan@google.com f94b8b0095 Fix failures.
Review URL: http://codereview.chromium.org//8525013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1432 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:37:38 +00:00
srdjan@google.com b6be92c2b3 Add FactoryNegativeTest.
Review URL: http://codereview.chromium.org//8525010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1431 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:25:44 +00:00
jimhug@google.com 90cd616329 Adds source information to all values (with no detectable perf impact). Uses Value more consistently for operations in gen. Starts down the path of cleaning up this type.
Review URL: http://codereview.chromium.org//8523012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1430 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 22:23:18 +00:00
sigmund@google.com 0ca2044217 Additional fixes for the bot
Review URL: http://codereview.chromium.org//8505040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1378 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 23:08:32 +00:00
ahe@google.com e08f3fd125 Allow error-recovery in top-level nodes.
Also fix a bunch of broken stuff: presubmit and scanner bench.

Review URL: http://codereview.chromium.org//8497042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1352 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 13:10:44 +00:00
hausner@google.com 120d154d76 Eliminate obsolete SuperNegativeTest
Dart automatically inserts a super() call if none is present
in the initializer list. This test has become obsolete.
Review URL: http://codereview.chromium.org//8499043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1335 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 00:49:10 +00:00
ahe@google.com 8b1b9e2276 Parse formal parameters.
This change also deletes the Parameter node class.

Review URL: http://codereview.chromium.org//8497011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1307 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 13:09:03 +00:00
ahe@google.com 7f942cf185 Update status file with bug numbers.
Review URL: http://codereview.chromium.org//8502013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1292 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 09:37:03 +00:00
ahe@google.com b137d6023d Test implicit this on fields.
Review URL: http://codereview.chromium.org//8438032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1289 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 09:02:46 +00:00
sigmund@google.com 28d55d0340 Isolates in frog - tweaks in existing js code to make it run. I plan to do an
actual cleanup on a second CL.

Review URL: http://codereview.chromium.org//8467034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1279 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 01:27:19 +00:00
hausner@google.com f59e679860 Capturing for loop variables correctly
Re-introduce a "fresh copy" of the for loop variable(s) in each iteration. Adding a minimal test to check that closures capture the value of the particular loop iteration. 
Review URL: http://codereview.chromium.org//8490019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1273 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 22:36:28 +00:00
jimhug@google.com 71513ed70f better property overriding field
+1 passing test for +10 lines in frogsh?  I think this fixes a lot of property overriding field cases - but only one of those appears to be covered in the current tests.

Review URL: http://codereview.chromium.org//8483005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1238 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-06 18:56:12 +00:00
jimhug@google.com 1a5fa2832e unary operators
+4 tests passing, -5 lines in frogsh

Review URL: http://codereview.chromium.org//8487003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1237 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-06 18:31:14 +00:00
jimhug@google.com e50dda8026 more negative test fixes
TODO around fixing function types hack for concrete methods is getting bigger - but I'm going to punt that until the official workweek as it doesn't seem like much fun <smile>.

Review URL: http://codereview.chromium.org//8485002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1236 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-06 16:19:20 +00:00
jimhug@google.com d5e00e9ae0 no-change, testing flakiness of dart_client tests
Review URL: http://codereview.chromium.org//8481024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1235 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-05 19:40:45 +00:00
jimhug@google.com af117a0842 minor fixes
BUG=
TEST=

Review URL: http://codereview.chromium.org//8481023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1234 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-05 18:19:19 +00:00
jimhug@google.com e6f1d5c142 All skipped tests should now be "correctly skipped" which means they should not count towards the total tests when computing percentages.
Fixed bugs in validating libraries and in static checking for named parameters as the easiest way to clean up the status of these tests.

Review URL: http://codereview.chromium.org//8481022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1233 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-05 16:04:19 +00:00
jmesserly@google.com a73af9f52c Better runtime type checks. The generated code is nicer+faster and they're generated in more places. Since it's reasonably fast now, I enabled it in presubmit.py.
TBR=jimhug

Review URL: http://codereview.chromium.org//8457007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1232 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-05 00:44:53 +00:00
sigmund@google.com b7c4e9b778 fix test
Review URL: http://codereview.chromium.org//8477011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1218 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 19:59:15 +00:00
ahe@google.com b22f088173 Update status file to unbreak dart/frog/presubmit.py.
Review URL: http://codereview.chromium.org//8457008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1193 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 12:18:36 +00:00
ngeoffray@google.com c93b5a40ea Integrate leg as a component in test.py. Also update presubmit script to run tests with leg.
Review URL: http://codereview.chromium.org//8462004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1187 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 10:29:48 +00:00
jmesserly@google.com b4cd0751a1 Reduces code generated by dynamic calls.
Also cleans type asserts
TBR=jimhug

Review URL: http://codereview.chromium.org//8334035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1163 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 21:16:50 +00:00
hausner@google.com a6b3f4f19c No returns allowed in constructors
Add compiler error message when a constructor explicitly returns a
value. Fixes bug/issue 224.
Review URL: http://codereview.chromium.org//8450009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1161 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 20:07:35 +00:00
ngeoffray@google.com 3dedc560f5 - Update tests to make sure they recerefence invalid code.
- Improve multi test case configuration by adding a 'continued' tag.
Review URL: http://codereview.chromium.org//8437091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1153 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 16:58:54 +00:00
zundel@google.com 2e6e49f78a Integrate frog tests into presubmit.sh
Review URL: http://codereview.chromium.org//8437064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1145 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 13:20:21 +00:00
ngeoffray@google.com 5d6af6602a Bleeding edge change to get frog integrated into the testing infrastructure.
Review URL: http://codereview.chromium.org//8372095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1140 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 12:15:55 +00:00
codefu@google.com 9f68a5c004 Naming scheme for negative tests
R=iposva
BUG=
TEST=

Review URL: http://codereview.chromium.org//8444001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1104 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 17:36:28 +00:00
hausner@google.com 7651034e9e Two-phase constructors
This CL fixes the initializer evaluation order and brings the VM fully up to spec.

Constructors are executed in two phases: the initializer phase and the constructor body phase. An additional implicit parameter tells the constructor code whether to execute the initializer list or the body (or both).

If the super initializer call is not at the end of the initializer list, the super constructor has to be called twice. The arguments to the super initializer have to be evaluated and stored in temporary local variables. At the beginning of the constructor block, a second implicit super call is inserted.

If the super initializer call happens to be at the end of the list, none of this madness has to happen, except for the extra implicit parameter to the constructor.

 
Review URL: http://codereview.chromium.org//8440014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1102 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 17:19:15 +00:00
codefu@google.com 01d80fb5c4 Add negative test for invalid prefixes.
Update dartc's parser to validate identifier in string literal.
Add new error code.
http://code.google.com/p/dart/issues/detail?id=266

R=mmendez
BUG=
TEST=

Review URL: http://codereview.chromium.org//8441001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1099 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 16:54:27 +00:00