1
0
Fork 0
Commit Graph

453 Commits (00c76c69dfc63c01afdede9d383974c88cc782de)

Author SHA1 Message Date
Mike Gerwitz 93eda3c14b Added tests proving traits' scopes are disjoint from classes' and each others'
This was the original motiviation behind, and is a beautiful consequence of,
the composition-based trait implementation (see
<https://savannah.gnu.org/task/index.php#comment3>).
2014-03-07 00:47:43 -05:00
Mike Gerwitz e44ac3190b Protected trait methods are now mixed in 2014-03-07 00:47:43 -05:00
Mike Gerwitz 3724b1bc0d Re-implemented mixin error for member name conflicts 2014-03-07 00:47:43 -05:00
Mike Gerwitz 71358eab59 Began implementing composition-based traits
As described in <https://savannah.gnu.org/task/index.php#comment3>.

The benefit of this approach over definition object merging is primarily
simplicitly---we're re-using much of the existing system. We may provide
more tight integration eventually for performance reasons (this is a
proof-of-concept), but this is an interesting start.

This also allows us to study and reason about traits by building off of
existing knowledge of composition; the documentation will make mention of
this to explain design considerations and issues of tight coupling
introduced by mixing in of traits.
2014-03-07 00:47:42 -05:00
Mike Gerwitz dfc83032d7 Basic, incomplete, but workable traits
Note the incomplete tests. These are very important, but the current state
at least demonstrates conceptually how this will work (and is even useful in
its current state, albeit dangerous and far from ready for production).
2014-03-07 00:47:42 -05:00
Mike Gerwitz 62035a0b4c Beginning of Trait and Class.use
This is a rough concept showing how traits will be used at definition time
by classes (note that this does not yet address how they will be ``mixed
in'' at the time of instantiation).
2014-03-07 00:47:42 -05:00
Mike Gerwitz 44a45d1f44
rmtrail now handles single-line comments following trailing comma 2014-03-07 00:47:28 -05:00
Mike Gerwitz 29576cfee4
Corrected GetPropertyDescriptorTest traversal test 2014-03-07 00:45:30 -05:00
Mike Gerwitz 7f8d265877
Corrected override of super-super methods
More generally, this was a problem with not recursing on *all* of the
visibility objects of the supertype's supertype; the public visibility
object was implicitly recursed upon through JavaScript's natural prototype
chain, so this only manifested itself with protected members.
2014-02-24 23:03:04 -05:00
Mike Gerwitz 9a3a71bc33
Added test/runner to run individual test cases
The check/test/test-suite make targets can still be used, but this at least
allows running specific test cases from the command line, which is extremely
useful during development.
2014-02-14 00:41:49 -05:00
Mike Gerwitz 89f00e0cdd [copyright] Copyright update 2014-01-20 22:55:29 -05:00
Mike Gerwitz 8789be1c4a Test suite will now output thrown data if stack not available 2014-01-20 22:23:22 -05:00
Mike Gerwitz ed0a784d9a Moved final test test-combine-pre-es5 into suite as CombinedPreES5Test
Holy hell that was a long and tedious process. It's nice to finally have
everything in the new test suite.

Still plenty of work to be done with refactoring (both the library and test
cases), though.
2014-01-20 22:14:42 -05:00
Mike Gerwitz 9fe55c54d6 Moved test-combine into suite as CombineTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 476f86723e Test runner will not output duplicate newline before results when total % 60 2014-01-20 22:14:42 -05:00
Mike Gerwitz 2f55d60993 Moved test-index into suite as IndexTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz a3baa99f1c Moved test-interface-name into suite as Interface/TestName 2014-01-20 22:14:42 -05:00
Mike Gerwitz 7b637db815 Moved test-util-prop-parse-keywords into suite as Util/PropParseKeywordsTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 6c0253c23c Moved test-util-prop-prase into suite as Util/PropParseTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 202ce8477f Moved test-util-get-property-descriptor into suite as Util/GetPropertyDescriptorTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 3301f22e69 Moved test-util-abstract into suite as Util/AbstractTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 086ede6849 Moved test-util-define-secure-prop into suite as Util/DefineSecurePropTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz c75241ca2b Moved test-util-copy into suite as Util/CopyTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 7b591ba426 Moved test-util-clone into suite as Util/CloneTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz ba1c3044de Moved test-prop_parser-parse-keywords into suite as PropParserKeywordsTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 72da8f2dee Moved test-warn-* tests into suite 2014-01-20 22:14:42 -05:00
Mike Gerwitz aad013bd87 Moved test-class-abstract into suite as Class/AbstractTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 37d66b375d Moved test-class-gettersetter into suite as Class/GetterSetterTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 0b1bf31b8d Moved test-class-name into test suite as Class/NameTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz ee886f2d37 Moved test-class-constructor into suite as Class/ConstructorTest
Also removed assertions that are performed elsewhere.

We broke onto the fifth line in the suite ;)
2014-01-20 22:14:42 -05:00
Mike Gerwitz d0bc34a7f3 Moved test-class-parent into test suite as Class/ParentTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 2b5bcaf02d Moved test-class-extend into suite as Class/{Extend,InstanceSafety}Test
More refactoring to come for ExtendTest at some point
2014-01-20 22:14:42 -05:00
Mike Gerwitz ae367964a3 Moved test-class into suite as Class/GeneralTest
This guy had some old tests indeed; it wasn't even in the second incarnation
of the test formats! Flasback to the beginning of ease.js.
2014-01-20 22:14:42 -05:00
Mike Gerwitz f11b3b1f38 Moved test-class_builder-final into test suite as ClassBuilder/FinalTest 2014-01-20 22:14:42 -05:00
Mike Gerwitz 2aca9726c3 Moved test-class_builder-member-restrictions into test suite as ClassBuilder/MemberRestrictionTest 2014-01-20 22:14:41 -05:00
Mike Gerwitz 782e2c96cb Moved test-class_builder-visibility into suite as ClassBuilder/VisibilityTest 2014-01-20 22:14:41 -05:00
Mike Gerwitz b5e72b2934 Moved test-class_builder-const into suite as ClassBuilder/ConstTest 2014-01-20 22:14:41 -05:00
Mike Gerwitz d8243707ad Moved test-class-visibility into suite as Class/VisibilityTest 2014-01-20 22:14:41 -05:00
Mike Gerwitz 85a201558d Moved ClassImplementTest into Class subdirectory in preparation for other test cases 2014-01-20 22:14:41 -05:00
Mike Gerwitz b281ccba8f Moved test-class_builder-static into suite as ClassBuilder/StaticTest 2014-01-20 22:14:41 -05:00
Mike Gerwitz fb501a45e8 Moved test-class-implement into suite as ClassImplementTest 2014-01-20 22:14:41 -05:00
Mike Gerwitz 97fbbd5bb9 [no-copyright] Modified headers to reduce GPL license notice width 2014-01-15 23:56:00 -05:00
Mike Gerwitz e03454b2b9 Corrected new Closure Compiler warnings 2014-01-06 22:05:05 -05:00
Mike Gerwitz 897b68e3e0 Tests now work properly with auto* and no longer require minified files 2013-12-23 00:27:20 -05:00
Mike Gerwitz 8b83add95f ease.js is now GNU ease.js.
On Sun, Dec 22, 2013 at 03:31:08AM -0500, Richard Stallman wrote:
> I hereby dub ease.js a GNU package, and you its maintainer.
>
> Please don't forget to mention prominently in the README file and
> other suitable documentation places that it is a GNU program.
2013-12-23 00:27:18 -05:00
Mike Gerwitz 26dffce00a [copyright] Copyright update after adding --follow to copyright script 2013-12-22 22:50:29 -05:00
Mike Gerwitz 13ca9cd852
[copyright] Copyright update after relicensing 2013-12-20 01:11:39 -05:00
Mike Gerwitz 9050c4e4ac
Relicensed under the GPLv3+
This project was originally LGPLv+-licensed to encourage its use in a community
that is largely copyleft-phobic. After further reflection, that was a mistake,
as adoption is not the important factor here---software freedom is.

When submitting ease.js to the GNU project, it was asked if I would be willing
to relicense it under the GPLv3+; I agreed happily, because there is no reason
why we should provide proprietary software any sort of edge. Indeed, proprietary
JavaScript is a huge problem since it is automatically downloaded on the user's
PC generally without them even knowing, and is a current focus for the FSF. As
such, to remain firm in our stance against proprietary JavaScript, relicensing
made the most sense for GNU.

This is likely to upset current users of ease.js. I am not sure of their
number---I have only seen download counts periodically on npmjs.org---but I know
there are at least a small number. These users are free to continue using the
previous LGPL'd releases, but with the understanding that there will be no
further maintenance (not even bug fixes). If possible, users should use the
GPL-licensed versions and release their software as free software.

Here comes GNU ease.js.
2013-12-20 01:10:05 -05:00
Mike Gerwitz 2a76be2461
[copyright] Copyright update 2013-12-20 00:50:54 -05:00
Mike Gerwitz daae0c6843
Corrected bug whereby multiple override calls would clear __super too early
Before this change, __super was set to undefined. However, consider that we have two
method overrides---foo and bar---and the code for bar is:

  this.foo();
  this.__super();

foo() would set __super to undefined and so bar cannot invoke its super method
unless it stores a reference to __super before invoking foo(). This patch fixes
this issue.
2013-04-20 21:55:40 -04:00