summaryrefslogtreecommitdiffstats
path: root/src/junit
Commit message (Collapse)AuthorAgeFilesLines
* JavaEmitter: Fix primitive StructEmitter for non-fixed-sized (size ↵Sven Gothel2011-12-183-3/+33
| | | | | | | | | conversion, ie. 32/64 bits) An opaque type still needs to be converted to the right size (32/64 bit). In case of a conversion, respect the pointer type. This fixes bug 536 .
* 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-0216-31/+31
|
* Fix Test1p2ProcAddressEmitter (static var); Add TestTracerSven Gothel2011-12-0217-16/+114
|
* TempJarCache/JNILibLoaderBase: Identify the Jar files by their URL within ↵Sven Gothel2011-12-012-6/+6
| | | | our lifecycle. JarFile's hash almost always differs.
* Test: Add unload of libraries as last test.Sven Gothel2011-12-011-5/+11
|
* 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
* Enhance ReleasePrimitiveArrayCritical: Use mode-flag JNI_ABORT if array is ↵Sven Gothel2011-10-063-7/+58
| | | | | | | | | | | | | const, ie no write-back We shall consider the C header declaration as being correct and no modification shall happen on const arrays. Tested w/ unit tests and JOGL +++ Cleanup JavaType: final immutable fields, proper CVoidPointer name
* 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.
* Unify JNI Library Loading into JNILibLoaderBase and use it for the ↵Sven Gothel2011-09-211-2/+2
| | | | | | | | gluegen-rt native lib as well - removed redundance - move proper JNLPAppletLauncher custom libloader code into JNILibLoaderBase - prepares for new JAR temp cache ..
* 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
|
* Cross JUnit Tests - All Passed: Android+Linux armv7Sven Gothel2011-07-251-10/+8
| | | | | | | | | | | - junit.cross targets: - use scripting to save time, ie write all target commands to script, xfer, exec - junit: delete result folder just before junit.run - Test BuildEnvironment.java: Simplify path config via properties (for android) - AndroidVersion: No annoying exception dump if Build$VERSION* is not found (not android) - launch scripts: use absolute TARGET_ROOT path for dynamic linker env.
* Cleaned up android build ; Cross junit/java android test/script; Fix ↵Sven Gothel2011-07-241-3/+3
| | | | | | | | | | | | | | | | | | | Test1p2ProcAddressEmitter Fix Test1p2ProcAddressEmitter - 3 tests used the wrong binding instance, where no native lib was loaded for - duh :) Cleaned up android build - add unix src (UnixDynamicLinkerImpl_JNI.c) - remove linker cmds in compile arguments Cross junit/java android test works via script - target command scrip is written to file, pushed and executed Status: com.jogamp.gluegen.test.junit.generation.Test1p2ProcAddressEmitter - passed - on par w/ linux-armv7
* 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
* GlueGen proper size / alignment of primitive and compound types usage [2/2] ↵Sven Gothel2011-07-214-33/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | - Fin MachineDesction == MD MD.StaticConfig: - enum for all supported static configs (ID -> MD) - verified at runtime: test runtime queried-MD versus static-MD, hard fail if not compatible (size/alignment) SizeThunk primitive sizes: - Add notion of fixed native size (eg. int64_t) and otherwise (eg. long) java struct 'wrappers' code generation: - single class using size/offset arrays of all MachineDescription configurations - at runtime the array idx is queried in static block - type aligment for not fixed-native-size types (SizeThunk, undef long/int) via StructAccessor junit test: - add float test - fix native code - add java (create, write) -> native (verify) test works (tested) on: linux 32/64 and 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.
* - Moved most types and StructLayout to runtime package:Sven Gothel2011-07-181-0/+7
| | | | | | | | | | | | | | | | | | | | | com.jogamp.gluegen.cgram.types -> com.jogamp.gluegen.runtime.types This is required for desired runtime memory layout. - Split CompoundType to StructType + UnionType - StructLayout: - Utilizing SizeThunk alignment - Alignment 1) Natural type alignment 2) Add Size 3) Trailing padding w/ largest element alignment - Only perform memory layout once for type. Status: - Unit test passes w/ static MachineDescriptor64Bit - FIXME static 32bit is faulty, uses 64bit size/alignment - TODO runtime struct layout to please all platforms w/o worrying
* 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-1713-21/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
|
* Cleanup test/junit structure. com.jogamp.test -> com.jogamp.opengl.text; ↵Sven Gothel2011-06-111-143/+0
| | | | Compile posted Issue* Bug* snippets
* NEWT/AWT Unit Tests: Run one test at a time via superclass ↵Sven Gothel2011-06-111-0/+3
| | | | | | | | | | | BeforeClass/AfterClass FileLock Due to the fact that any test with a UI may interfere with a UI test (test focus, active, ..), all tests are derived from the common UITestCase superclass, which decorates the test class with a FileLock at BeforeClass/AfterClass. Increased junit timeout to 10 min
* Newt/AWT: Add singleton test instance lock for all AWT Robot tests, ↵Sven Gothel2011-06-111-0/+140
| | | | otherwise multiple parallel tests will render the result invalid
* Merged Locator -> IOUtil; int Platform.getPageSize(); Added unit test for ↵Sven Gothel2011-06-082-0/+181
| | | | IOUtil and Platform's page size
* NativeBuffer/PointerBuffer API/Impl Change (remove explicit backup array, ↵Sven Gothel2011-04-275-51/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alloc referenced data map if used only) This patch doesn't impact GlueGen's code generation, but enhance and fix PointerBuffer usage only. remove explicit backup array As suggested by Michael Bien with a proposed patch, PointerBuffer's backup array is not only redundant in case it's not used, but also erroneous - due to possible sliced buffers. Removes the explicit backup array implementation leaving it up to the user, ie how PointerBuffer is created (alloc/allocDirect) and use the underlying nio's buffer backup array, if available. This also fixes the (never tested) case of indirect w/ backup array usage on 32bit platform size. In this case the array shall be of type int[], holding 32bit pointer - on 64bit long[]. Previous to this patch, it was always long[]. Added more thorough tests of PointerBuffer, notably indirect w/ backup array and native deep copy and filling of a pointer array. alloc referenced data map if used only As suggested by Michael Bien with a proposed patch, the allocation of the dataMap hash map is redundant in case it's not used. The hash map will be initialized lazy, if needed only.
* refactoring in common.nio public api - removed Int64BufferMichael Bien2011-04-261-26/+26
| | | | | | - removed Int64Buffer since it is no longer needed for LongBuffer emulation Signed-off-by: Sven Gothel <[email protected]>
* 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-15/+8
|
* 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-256-29/+306
| | | | 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
* Fix size_t, uintptr_t and uint32_t, uint64_t: suppress 'unsigned' in ↵Sven Gothel2010-11-143-0/+61
| | | | | | | 'toString()' ; Added type tests. For size_t and uintptr_t this actually generated invalid C code. Added type tests for those.
* 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
|