aboutsummaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* LICENSE.txt changes:Sven Gothel2010-09-142-0/+56
| | | | | | | | | | | | | - Added JogAmp Community and common denominator: New BSD 3-clause license - Added note to make/lib binary file (source and license) Added source and license text for external binaries used in build process (make/lib folder). Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.
* Fix: Add missing imports; Add warmup phase to primitive hashmap testSven Gothel2010-07-022-6/+20
|
* Move HashMapTest to junit.run; Unify classes to only 'Test' in their name if ↵Sven Gothel2010-05-102-0/+334
they are a junit test.