Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shannah/parparvmtests
Unit tests for ParparVM
https://github.com/shannah/parparvmtests
Last synced: 9 days ago
JSON representation
Unit tests for ParparVM
- Host: GitHub
- URL: https://github.com/shannah/parparvmtests
- Owner: shannah
- Created: 2020-10-19T22:50:31.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-30T17:46:36.000Z (about 4 years ago)
- Last Synced: 2024-12-24T05:04:53.353Z (18 days ago)
- Language: Java
- Size: 281 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= ParparVM Tests
This project contains unit tests for https://www.codenameone.com[CodenameOne's] ParparVM, an ahead-of-time Java compiler and virtual machine for iOS.
== Installation
[source,bash]
----
git clone https://github.com/shannah/ParparVMTests
cd ParparVMTests
sh setup.sh
----== Running Tests
1. Open the project in NetBeans
2. Build the project for iOS
3. Install/Open the resulting App.
4. Press the "Run Tests" button in the app.== Adding Tests
. Create a new class which extends `AbstractTest`. This can be named anything you like, and it can be in any package you like.
.. Implement the `toString()` method to return the test name.
.. Implement the `runTest()` method to actually run the test. Generally I implement many other private methods to run individual tests, and just call them from the `runTest()` method.
.. If this test should run on the EDT, then implement the `shouldExecuteOnEDT()` method to return `true`.
. Add an instance of your class to the TestRunner in the https://github.com/shannah/ParparVMTests/blob/master/src/com/codename1/parpar/tests/ParparVMTests.java[ParparVMTests] class:
+
[source,java]
----
TestRunnerComponent r = new TestRunnerComponent();
r.add(new BooleanTest(),
//java.lang
new CharacterTest(),
new ClassTest(),
new DoubleTest(),
new EnumTest(),
new FloatTest(),
new IntegerTest(),
//... etc...
new MyTest()
----
. Build and run the test runner to ensure that your test works.You can refer to any of the existing tests as reference. E.g. https://github.com/shannah/ParparVMTests/blob/master/src/com/codename1/parpar/tests/java/lang/BooleanTest.java[BooleanTest], https://github.com/shannah/ParparVMTests/blob/master/src/com/codename1/ui/TestPicker.java[TestPicker], etc..
Once you have a working test, send a pull request to this repo with your test.
== Author
https://sjhannah.com[Steve Hannah]
== More Information
. https://www.codenameone.com[The Codename One Website]