Skip to content

Make tests more android friendly #632

@MeFisto94

Description

@MeFisto94

Hey Guys,
As I was working on the Tests in the sdk today I discovered that some tests have dependencies on jme3-desktop, which makes them useless for Android.

A) TestFancyCar had some old SettingsDialog imports which were unusued actually. See 479392f

B) TestMipMapGen: We have two MipMapGenerator's. One in jme3-desktop and one in jme3-core. The Desktop pendant uses AWT, which doesn't work on Android. Technically they should do the same so the question is if there is a valid reason to still keep the one in jme3-desktop? See 10b23db

Those commits are only applied to 3.1 because I actually pushed them by mistake (my old git tool always asked for the appropriate remote, for this one you have to set it in the settings), so sorry for the inconvenience.

C) TestRenderToMemory uses jme3-desktop's com.jme3.util.Screenshots.
By looking into Screenshots it seems to me that it only depends on AWT for the Buffers however we already have our own buffer implementations so we might be independent from AWT here?
Apart from that convertScreenShot2 is a horrible name for jme buffer to Image Object and the name Screenshot itself is also a bit misleading.
I don't know what to do there since I am unfamiliar with the classes, though.

D) TestAbsoluteLocators depends on AWTLoader for the textures however I don't think it's possible to have some conditional code for Android there? Maybe we could add a TestAbsoluteLocatorsAndroid and the SDK deletes the relevant test?

E) The whole jme3test.awt package is useless on Android. There are neither Applets nor AWT Canvases to use. The SDK will simply remove the AWT package when creating the Android Tests. Is that okay?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions