summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common
Commit message (Collapse)AuthorAgeFilesLines
...
* Dump Envs: Suppress COOKIE, SSH and GPG env varsSven Gothel2012-03-281-4/+19
|
* Test: Add dump of environment varsSven Gothel2012-03-281-4/+17
|
* Add support for armhf/gnueabihf resulting in new 'os.and.arch' := [ ↵Sven Gothel2012-03-282-4/+63
| | | | | | | | | | | | | | | | 'android-armv7hf' and 'linux-armv7hf' ] - Platform gets new ABIType [ GENERIC, ARMEL, ARMHF ] - Platform impl. needs to guess ABIType in case of ARM, since no Java system property ('os.arch' ..) reflects the new EABI. I consider this a bug, since this will also hinder JNLP to work. The latter also uses 'os.arch' sys property to determine the nativelib resource! (See Platform.guessABITypeImpl(..) for details how we guess the type.) - Adding symbolic links to ubuntu's gnueabihf cross tool chain - Adding armhf crossbuild script
* Add 'asset' URLConnection; IOUtil uses URLConnection / incr. effeciency; ↵Sven Gothel2012-03-175-15/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android ClassLoaderUtil cleanup; - Add 'asset' URLConnection - Please read API doc 'PiggybackURLConnection' and 'AssetURLConnection' - Solves generic resource handling where platform locations may differ, ie ClassLoader lookup on Android in the 'assets/' subfolder. - New Android 'AssetDexClassLoader' uses 'assets/' folder for findResource(..) - aapt.signed (our APK ant task) - uses 'assets/' folder - adds the 'assetsdir' attribute allowing to copy other assets into the APK - IOUtil uses URLConnection / incr. effeciency - using URLConnection on all getResource(..) since URL is connected anyways for validation and URLConnection can be used by caller right away - String getRelativeOf(URL, String) -> URL getRelativeOf(URL, String) - preserves scheme, authority, etc - simple parentOf handling, more efficient - reusing new 'asset' protocol impl. - Android ClassLoaderUtil cleanup; - Use createClassLoader(..) impl for build-in static jogamp and user APKs, which removes code redundancy Tests: New code path, especially 'assets' are covered by new unit tests, no regressions on Linux.
* Stabilize open InputStream's / Closeable's: Decorate w/ try-finally and ↵Sven Gothel2012-03-101-4/+22
| | | | close within the latter
* Don't build and use gluegen.apk (compile time only) ; Don't test classloader ↵Sven Gothel2012-03-071-5/+16
| | | | | | -> JarURL on Android All [remaining] tests passed on Android!
* android test: Specify 'java.io.tempdir' and add TestJarsInJar.apk / Disable ↵Sven Gothel2012-03-071-0/+6
| | | | most of tests in TestJarUtil
* RecursiveThreadGroupLock: New recursive lock interface and impl, allowing ↵Sven Gothel2011-12-111-0/+327
| | | | | | | | | | | | 'spawn off' process to become the lock owner. To avoid complicated synchronization via synchronized, wait and notify between one thread and a 'spawn' off thread which temporarly requires the hold lock, RecursiveThreadGroupLock allows to add and remove other threads to become owners of the lock as if they were the original holder. This simplifies some rare locking use cases, eg. in JOGL's GLProfile initialization sequence where a SharedResourceRunner thread is taking over initialization of shared resources.
* TestTracer -> JunitTracerv2.0-rc4Sven Gothel2011-12-0214-28/+28
|
* Fix Test1p2ProcAddressEmitter (static var); Add TestTracerSven Gothel2011-12-0214-14/+34
|
* TempJarCache/JNILibLoaderBase: Identify the Jar files by their URL within ↵Sven Gothel2011-12-012-6/+6
| | | | our lifecycle. JarFile's hash almost always differs.
* JarUtil: Improve Robustness (Bug 522) and API doc, prepare for Jar-In-Jar. ↵Sven Gothel2011-11-292-5/+174
| | | | | | | | Add unit test. Misc.: - IOUtil: Add toURL* methods - TempJarCache: Add 'URL getResource(String)'
* Add assertion to RunnableTask test case (forgot in commit: ↵Sven Gothel2011-11-221-1/+4
| | | | 43b7675259eb76c570b6cc3a44fec2b9f6410697)
* RunnableTask: Add documentation, incl. unit test. Add ↵Sven Gothel2011-11-221-0/+100
| | | | ReflectionUtil.MethodAccess, a convenient Method instance accessor.
* Fix VersionNumber cstr w/ string parsing: cutt-off non-digit-parts, suppress ↵Sven Gothel2011-10-272-0/+26
| | | | exceptions
* Lock ChangeSet (fin): Cleanup, fix and enhance RecursiveLock implementationSven Gothel2011-09-271-77/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - RecursiveLock _is_ interface. - Use LockFactory to create a RecursiveLock. - Impl: RecursiveLockImpl01Unfairish - just using notify w/o any queue: fast - still enqueuing new lock-applicants if queue full (nice) - lock's sync extends AbstractOwnableSynchronizer and uses it (monitor) - Impl: RecursiveLockImpl01CompleteFair - using queue and interrupt for correctness (slow) - lock's sync extends AbstractOwnableSynchronizer and uses it (monitor) - Impl: RecursiveLockImplJava5 for using Java5's concurrency impl. - to verify correctness, performance and deviation of locking time TestRecursiveLock01 new performance measurements incl. simple avrg and deviation shows best combined performance-deviation w/ our RecursiveLockImpl01Unfairish os Linux and MacOSX. RecursiveLockImpl01Unfairish is the default in LockFactory. Adding 'private' LockDebugUtil, allowing validating all holdings locks of one thread as stack traces (Throwable). Besides the AbstractOwnableSynchronizer utilization, this helps debugging deadlocks and starvation very well.
* TempJarCache/JNILibLoaderBase: Validate the to be loader JarFile's ↵Sven Gothel2011-09-231-3/+18
| | | | Certificates if caller has any. Add Convenient JNILibLoaderBase.addNativeJarLibs(..) method.
* Temp Cache: More control over the lifecycle, explicit TempJarCache ↵Sven Gothel2011-09-201-2/+26
| | | | initialization/usage only
* Enhancements / New utils: JarUtil, TempFileCache and TempJarCacheSven Gothel2011-09-191-0/+218
| | | | | | | | | | | | | | | | | | | | JarUtil: Utility to handle Jar files and it's content, incl. extracting it's entries TempFileCache: Utility to have a save temporary file cache per JVM and per instance, eg. per ClassLoader. The temp cache is cleaned up with the next usage of TempFileCache, which solves the troubles of JVM bugs and situations where the JVM is not able to close and delete open temp files. TempJarCache: Utility to cache Jar files temporary (using TempFileCache) and access it's content. This class is suitable to implement a URLClassLoader or similar resource loading facilities. All tested w/ TestTempJarCache
* ArrayHashSet: Add Java Generics SyntaxSven Gothel2011-08-241-10/+6
|
* fix cross test: Test* -> *Test* ; Reduce iterations further for ARM to ↵Sven Gothel2011-07-235-8/+8
| | | | speedup test
* Fix TestStructAccessorEndianSven Gothel2011-07-211-3/+10
| | | | | | | | | | | | - StructAccessor uses byteOffset now (since 8b3057585930357bb16546f584d998953b084034) Fix linux armv7l eabi: - build.xml arm7 -> armv7 - all tests passes Adding NativeSizeAlignment-linux-armv7l_eabi from passing test OK: linux 32/64/armv7l, windows 32/64
* Cleanup: Platform CPU enum, MachineDescription,Sven Gothel2011-07-205-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Platform: - enum CPUFamily is part of CPUType - DALVIK -> ANDROID - ARM: ARM + ARMv[567] MachineDescription - self contained - static size/alignment Config (enum) for unix32, unix64, win32, win64 and armeabi - add 'long double' - Removed MachineDescription32Bit, MachineDescription64Bit - createStatic(..) uses OS/CPU to fetch best match if not at runtime FIXES: JavaEmitter's struct-emit: Proper 32/64 struct sizes TODO: StructAccessor's mapping to <Type>Buffer w/ index os sizeof(<Type>) doesn't work, since offset may not be multiple of sizeof(<Type>)! i.e. typedef struct { int8_t bits1; // +1 - 0 // +3 (p32) int32_t id; // +4 - 4 int8_t bits2; // +1 - 8 // +3 (p32) - int64_t long0; // +8 - 12 so "longBuffer.get(<type-sized index>)" is invalid, but "byteBuffer.getLong(<byte index>)" must be done. The actual impl. doesn't matter, hence dropping the other nio type mappings is good.
* Junit tests on ARM: Reducing some test/perf loops allowing to pass tests on ↵Sven Gothel2011-07-175-8/+38
| | | | low performance ARM
* GlueGen proper size / alignment of primitive and compound types usage [1/2] ↵Sven Gothel2011-07-174-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Preparation. Currently GlueGen fails for type long (size) and some alignments (see package.html). - The size and alignment values shall be queried at runtime. - Compound alignment needs to follow the described natural alignment (also @runtime). - - Build - add Linux Arm7 (EABI) - junit test - added compound/struct tests, pointing out the shortcomings of current impl. - package.html - Added alignment documentation - remove intptr.cfg - add GluGen types int8_t, int16_t, uint8_t, uint16_t - move MachineDescription* into runtime - Platform - has runtime MachineDescription - moved size, .. to MachineDescription - use enums for OSType, CPUArch and CPUType defined by os.name/os.arch, triggering exception if os/arch is not supported. This avoids Java String comparison and conscious os/arch detection. - MachineDescription: - compile time instances MachineDescription32Bits, MachineDescription64Bits - runtime queried instance MachineDescriptionRuntime - correct size, alignment, page size, ..
* Fix HastMapTests - Clone: Use unique random pairs: key,valueSven Gothel2011-06-267-118/+284
|
* Merged Locator -> IOUtil; int Platform.getPageSize(); Added unit test for ↵Sven Gothel2011-06-082-0/+181
| | | | IOUtil and Platform's page size
* Primitive HashMap: Add deep clone(); Fix containsValue() in case of Object ↵Sven Gothel2011-03-192-3/+324
| | | | values (using equals(Object)); Adding junit tests for clone(), capacity and IntObjectHashMap
* fix TestRecursiveLock01's LockedObjectAction1 syncSven Gothel2011-02-261-8/+5
|
* cleanup importsSven Gothel2011-02-261-7/+0
|
* - ensure slice uses the buffers original byteorder.Michael Bien2011-02-221-0/+2
| | | - create new buffers only if size > capacity not if >= capacity
* added CachedBufferFactory + test.Michael Bien2011-02-131-0/+244
| | | factory supports dynamic and static allocation schemes and has a synchronized and a unsynchronized implementation.
* improved BuffersTest.slice().Michael Bien2011-02-131-1/+32
|
* moved struct and buffer test to its nio friends, cleaned up importsMichael Bien2011-02-132-0/+89
|
* HashMapTest: Back to 50% tolerance, removed 'put' errorSven Gothel2010-11-252-8/+8
|
* Disabled Struct* Tests (not working on Windows .. platform; Moved ↵Sven Gothel2010-11-251-0/+57
| | | | BuffersTest and PCPP to the proper src/junit folder. All junit tests are now handled by build-junit.xml
* Fix HashMapTests. The benchmark tests used the value as a key, hence finding ↵Sven Gothel2010-11-252-18/+32
| | | | the non existing hashed value lead to O(n)
* Make Primitive HashMap Benchmark test tolerant ~ 50%v2.0-rc1Sven Gothel2010-11-232-6/+10
|
* Buffers float/double conversion: Add arg for given destination buffer; Add ↵Sven Gothel2010-11-191-0/+153
| | | | back conversion; Add unit test for arrays
* JogampVersion: StringBuffer getInfo(StringBuffer) -> StringBuffer ↵Sven Gothel2010-11-141-1/+1
| | | | toStringBuffer(StringBuffer) ; Add String toString() { ..}
* com.jogamp.common.util.GlueGenVersion -> com.jogamp.common.GlueGenVersionSven Gothel2010-11-121-0/+1
|
* New: JogampVersion, providing generic information for Jogamp JAR archives; ↵Sven Gothel2010-11-121-1/+5
| | | | | | | | | VersionInfo -> GlueGenVersion JogampVersion, providing generic information for Jogamp JAR archives Accessor to the Jogamp specific manifest additions, ie branch and commit. Also provides convenient attribute access and version dump methods.
* VersionInfo self containing (adding main)Sven Gothel2010-11-101-2/+1
|
* Add generic VersionUtil (Manifest and Platform) ; Add VersionInfoSven Gothel2010-11-101-0/+49
|
* Fixed benchmarking bugs in primitive HashMap test.Elijah C. Menifee2010-11-062-20/+29
| | | | | | | | | | | | | | | | | | | | | | Both IntIntHashMapTest and LongIntHashMapTest failed to reset test start time. The time values for intmapGetTime,mapGetTime,intmapRemoveTime,and mapRemoveTime all used the start time value from mapPutTime. This caused the following to be always/guarenteed to be true: mapPutTime < intmapGetTime < mapGetTime < intmapRemoveTime < mapRemoveTime thus not actually testing the following asserts: assertTrue("'get' too slow", intmapGetTime <= mapGetTime); assertTrue("'remove' too slow", intmapRemoveTime <= mapRemoveTime); In addition the results of the test were being printed before the actual test ran. Changed code to reset time to System.nanoTime() prior to each for loop, and moved time calculation and result output to below the test for loop. I also improved the output of the test info, by including the warmup status on benchmark start.
* TestRecursiveLock01: Reduce threads/loop, otherwise slow machines will time outSven Gothel2010-11-021-12/+12
|
* ArrayHashSet: Add 'getOrAdd(key)' identity method to conveniently get the ↵Sven Gothel2010-10-231-0/+13
| | | | identity or add it, if not exist yet
* New jogamp.common.util.ArrayHashSet, providing O(1) queries/add and identity ↵Sven Gothel2010-10-233-19/+233
| | | | operations
* Moved locking to: com.jogamp.common.util.locks ; Better abstraction ; Misc ↵Sven Gothel2010-10-141-13/+14
| | | | changes
* Added TestRecursiveToolkitLock; junit.run: disable inner classes in batch runSven Gothel2010-10-091-0/+279
|