aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/syntax/BaseFunctionTest.java
Commit message (Collapse)AuthorAge
* Migrated EvaluationTestCase (and all tests depending on it) to JUnit 4.Gravatar Florian Weikert2015-12-01
| | | | | -- MOS_MIGRATED_REVID=109064201
* Replace "Google Inc" with "The Bazel Authors" in every copyright notice.Gravatar Lukacs Berki2015-10-21
| | | | | -- MOS_MIGRATED_REVID=105949508
* Open source some skylark tests.Gravatar Han-Wen Nienhuys2015-09-22
| | | | | -- MOS_MIGRATED_REVID=103652672
* Implement Skylark function reprGravatar Francois-Rene Rideau2015-06-15
| | | | | | | | | | | | | | | | | Move printing code from EvalUtils to Printer. Rename functions in Printer: printValue becomes str or print, prettyPrintValue becomes repr or write, formatString becomes format, makeFormattable becomes strFormattable, prettyPrintValues becomes listString. write being self-sufficient is made the reference, and print is the one that is a wrapper around write, rather than the other way around, avoiding mutual recursion. -- MOS_MIGRATED_REVID=95897834
* Simplify Skylark testsGravatar Francois-Rene Rideau2015-04-13
| | | | | | | | | | | | | | | | | | Use the new EvaluationContext infrastructure to simplify Skylark tests (said infrastructure is originally based on code from these tests). Merge AbstractEvaluationTestCase and AbstractParserTestCase into a non-abstract class EvaluationTestCase that uses EvaluationContext. Cleanup the EventCollectionApparatus it uses. Refactor all Skylark tests to use this new infrastructure. Fix EvaluationTest and MethodLibraryTest to actually and correctly run tests in both modes. Fix small bugs in the main code base discovered by actually running the code in both modes, and make error messages identical when possible. -- MOS_MIGRATED_REVID=90828053
* Reorder arguments to BuiltinFunction-sGravatar Francois-Rene Rideau2015-03-31
| | | | | | | | | | By popular demand from other implementers, reorder BuiltinFunction arguments so that mandatory named-only arguments come befor optional named-only arguments rather than after. This will make Skylark internals slightly clearer and less surprising, at the cost of eschewing a tiny optimization. -- MOS_MIGRATED_REVID=89978554
* New class hierarchy for Skylark functionsGravatar Francois-Rene Rideau2015-03-20
* New hierarchy BaseFunction > UserModeFunction, BuiltinFunction. The old hierarchy still exists for now, to be deleted after migration: Function > AbstractFunction > MixedModeFunction > (UserModeFunction, SkylarkFunction > SimpleSkylarkFunction) (UserModeFunction is already migrated, and BaseFunction implements Function, for now.) * Function supports *args and **kwargs when calling functions, and mandatory named-only parameters in the style of Python 3. Notable difference with Python: *args binds the variable to a tuple, because a Skylark list would have to be monomorphic. * A better, simpler, safer FFI using reflection with BuiltinFunction. Handles typechecking, passes parameters in a more Java style. (Not used for now, will be used later.) * A new annotation @SkylarkSignature, intended to replace @SkylarkBuiltin, supports the full function call protocol, including default arguments. * Support for annotating function Factory-s rather than functions. -- MOS_MIGRATED_REVID=88958581