Commit d08c4a5
authored
Improvements to README and tests (#1748)
* test: Prevent AST parser tests from waiting for the timeout on failure
Previously, if these tests were to fail, they'd never call `done()` and so
Jasmine would wait for the full timeout period before declaring the tests
failed. (This would happen if you didn't have the NPM dependencies
installed.)
* fix: Import toplevel Gradle properties in SBG tests
The build file for SBG tests uses some properties, such as
ns_default_asm_version, that are defined in the toplevel build file. This
build file needs to import those properties.
* docs: Add README steps
One step for installing the jsparser tests dependencies. This also updates
the lockfile if you do it with a recent version of NPM; speculatively
including that in this commit in case it doesn't break anything else.
Another step for setting the appropriate environment variables. They're
already mentioned in the Android Studio instructions above, but you'll
need to set them separately in your shell if building from the command
line.
* test: Don't try to load lib/rt.jar in SBG tests
This JAR file, which contains the Java runtime classes, doesn't exist as a
separate file ever since Java 9.x. Therefore this test can't work as it
previously did.
This removes the setup code that tries to read rt.jar, which always fails.
It adds assertions for the results of generateBinding(), since in the
current state of the test, without access to rt.jar, the generation fails
and generateBinding() returns null.
* test: Add a small helper to SBG for introspecting system classes
Since we can no longer load lib/rt.jar, and system classes no longer exist
in an actual JAR file, this introduces a small helper function to get a
BCEL JavaClass for a system class, using ClassPath.SYSTEM_CLASS_PATH.
(I'm not sure why this only came up in tests and not in runtime execution
of the static binding generator, though.)
* test: Remove references to Pack200 from SBG test data
The Pack200 interface was removed in Java 11, so these interfaces no
longer exist in modern Java. I believe they were only used as sample
interfaces in the tests anyway, so just remove them from the test data.
* docs: Fix "runtests" command
"gradlew runtest" doesn't work because Gradle complains the name of the
target is ambiguous.
* docs: Update inspector documentation
Some of the paths need to be updated.
The JSON file is now generated, not checked in to V8. So in order to edit
the protocol we need to modify the PDL file, which is the source of the
JSON file.
* chore: Add fake project files for easier inspector debugging
These files make it possible to run the test-app in Android Studio, then
connect it to the devtools inspector with `ns debug android --start`.
(The package.json lists a dependency, but there's no need to run `npm
install` if you have the NativeScript CLI already installed globally.)1 parent 5e767b9 commit d08c4a5
File tree
14 files changed
+1568
-205
lines changed- docs
- test-app
- build-tools
- jsparser/tests
- specs
- static-binding-generator
- src
- main/java/org/nativescript/staticbindinggenerator
- generating/parsing
- classes/hierarchy/impl
- methods/impl
- test
- java/org/nativescript/staticbindinggenerator/test
- resources/org/nativescript/staticbindinggenerator/test
14 files changed
+1568
-205
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
| |||
87 | 99 | | |
88 | 100 | | |
89 | 101 | | |
90 | | - | |
| 102 | + | |
91 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
92 | 123 | | |
93 | 124 | | |
94 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments