summaryrefslogtreecommitdiffstats
path: root/src/junit
Commit message (Collapse)AuthorAgeFilesLines
* - 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
|
* Add generic VersionUtil (Manifest and Platform) ; Add VersionInfoSven Gothel2010-11-101-0/+49
|
* Gluegen: Types (stddef/stdint), Header and Predefined Macro ChangeSven Gothel2010-11-091-1/+10
| | | | | | | | | | | | | Read API doc ad GlueGen.java New predefined types: wchar_t, intptr_t, uintptr_t New reusable headers for gluegen usage: make/stub_includes/gluegen for native usage: make/stub_includes/platform New predefined macro #define __GLUEGEN__ 2
* Fix PCPP 'define' case; Keep PCPP output file if 'debug' ; GlueGen uses PCPP ↵Sven Gothel2010-11-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | in same thread via File. Fix PCPP 'define' case ------------------------ A recursive define like: #define LALA ((int)1) #define LILI LALA was streamed out of PCPP, even though such 'macro defines' like #define LILI ((int)1) are disabled due to the parsers inability to digg those. Added test on macro definition for replaced values. GlueGen uses PCPP in same thread via File ------------------------------------------ To ease debugging we call PCPP from the same thread and use normal temp files as i/o. Keep PCPP output file if 'debug' --------------------------------- Keep temp outfile if debug is enabled
* 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-147-134/+170
| | | | | | | | | | | | | - 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-109-88/+422
| | | | they are a junit test.
* renamed method.Michael Bien2010-04-242-15/+1
|
* Refactored ProcAddressTable generation.Michael Bien2010-04-241-1/+1
| | | | | - ProcAddressTable is now the common superclass for all tables - Removed ProcAddressHelpers and added FunctionAddressResolver extension mechanism
* Use JNILibLoader in the junit testSven Gothel2010-04-243-3/+61
|
* *** Now Using Apache-Ant-1.8.0 ***Sven Gothel2010-04-101-6/+0
| | | | | | | | Adding ant-contrib-1.0b3.jar for loops and mutable properties. Cleanup: - Adding Javac includeAntRuntime argument (false whenever possible) - Clear junit results folder before testing - Move deprecated stuff from lib to lib/archive
* http://jogamp.org/bugzilla/show_bug.cgi?id=393Sven Gothel2010-04-084-30/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed junit test: test1 - Create seperate native libraries to reflect a real world example: test1 - the library to bind to (no more declaring __stdcall @nn functions) BindingTest1p1 - the dynamic fixed linkage binding test1p1, references dynamic library test1 at linktime. BindingTest1p2 - the dynamic runtime linkage binding test1p2, loads dynamic library test1 at runtime. Generic: - gluegen-cpptasks-base.xml - target 'gluegen.cpptasks.detect.os' Set new property 'system.env.library.path' DYLD_LIBRARY_PATH (macosx) LD_LIBRARY_PATH (unix) PATH (windows) - target 'gluegen.cpptasks.striplibs' Strips the symbols out of the native libraries in case c.compiler.debug is false. Maybe configured with the properties: c.strip.tool, c.strip.args - Using system.env.library.path in junit call to find the test1 library in case of runtime linkage and lookup (test1p2). - Use gluegen.cpptasks.striplibs for all native libs .. - Added macosx32 in analogy to macosx64, both defaults to true now - com.jogamp.common.os.WindowsDynamicLinkerImpl:lookupSymbol() - Added lookup for __stdcall @nn (stepping alignment 4, max-args: 12) in case no undecorated __cdecl symbol is found. Fixed Windows platform: - Use proper path.seperator on Windows. - test1.dll needs proper soname inside for fixed linkage (test1p1) hence the output name must be test1.dll, not libtest1.so +++ http://jogamp.org/bugzilla/show_bug.cgi?id=394 Fix MacOsX platform: The commit of cpptasks.jar, git hash 129e783741d91e9ee5cd7da5d5c962c32ec96b0b, broke the universal binary build on MacOSX. The above change used cpptasks-1.05b with a few patches in regards to crosscompilation, but missed one, which accepts the '-arch' argument for GccLinker undecorated. The new cpptasks.jar is vanilla 1.05b + cpptasks-1.0b5-darwin-patch.diff, the latter a more refined one. This version accepts the '-arch' argument undecorated on the darwin platform. +++
* Fix 32bit masking / testsSven Gothel2010-04-012-2/+2
|
* Fix build ..Sven Gothel2010-04-011-1/+0
|
* Merged with latest of mbienSven Gothel2010-03-317-13/+17
|\
| * introduced com.jogamp.common.{nio,os} packages and moved some classes.Michael Bien2010-03-315-11/+13
| |
* | Buffer heritage added. Migrated old runtime tests.Sven Gothel2010-03-3114-31/+126
|/
* http://www.jogamp.org/bugzilla/show_bug.cgi?id=392Sven Gothel2010-03-301-2/+44
| | | | | | | | | | | | | | | | | | 32bit/64bit values and arrays are misrepresented - PointerBuffer: Adding methods PointeRBuffer referenceBuffer(int index, Buffer data) PointeRBuffer referenceBuffer(Buffer data) Buffer getReferencedBuffer(int index) Buffer getReferencedBuffer() Adding a reference of a given direct Buffer to this pointer buffer, and retrieving a previously referenced direct Buffer. This allows a more convenient handling of PointerBuffer with the user API's ..