enso/test
Jaroslav Tulach 4465d63dd8
Improved polyglot Date support (#3559)
Significantly improves the polyglot Date support (as introduced by #3374). It enhances the `Date_Spec` to run it in four flavors:
- with Enso Date (as of now)
- with JavaScript Date
- with JavaScript Date wrapped in (JavaScript) array
- with Java LocalDate allocated directly

The code is then improved by necessary modifications to make the `Date_Spec` pass.

# Important Notes
James has requested in [#181755990](https://www.pivotaltracker.com/n/projects/2539304/stories/181755990) - e.g. _Review and improve InMemory Table support for Dates, Times, DateTimes, BigIntegers_ the following program to work:
```
foreign js dateArr = """
return [1, new Date(), 7]

main =
IO.println <| (dateArr.at 1).week_of_year
```
the program works with here in provided changes and prints `27` as of today.

@jdunkerley has provided tests for proper behavior of date in `Table` and `Column`. Those tests are working as of [f16d07e](f16d07e640). One just needs to accept `List<Value>` and then query `Value` for `isDate()` when needed.

Last round of changes is related to **exception handling**. 8b686b12bd makes sure `makePolyglotError` accepts only polyglot values. Then it wraps plain Java exceptions into `WrapPlainException` with `has_type` method - 60da5e70ed - the remaining changes in the PR are only trying to get all tests working in the new setup.

The support for `Time` isn't part of this PR yet.
2022-07-21 06:32:40 +00:00
..
Benchmarks Remove 'here' and make method name resolution case-sensitive (#3538) 2022-07-07 10:31:06 +00:00
Examples_Tests Remove 'here' and make method name resolution case-sensitive (#3538) 2022-07-07 10:31:06 +00:00
Geo_Tests Import syntax including namespace (#1806) 2021-06-24 12:42:24 +02:00
Google_Api_Test Remove 'here' and make method name resolution case-sensitive (#3538) 2022-07-07 10:31:06 +00:00
Image_Tests Type name case fixes: (#3590) 2022-07-19 14:09:09 +00:00
micro-distribution Improved polyglot Date support (#3559) 2022-07-21 06:32:40 +00:00
Table_Tests Improved polyglot Date support (#3559) 2022-07-21 06:32:40 +00:00
Tests Improved polyglot Date support (#3559) 2022-07-21 06:32:40 +00:00
Visualization_Tests Type name case fixes: (#3590) 2022-07-19 14:09:09 +00:00