summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-033-47/+47
| | | | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* Bug 923: Remove dependency of CStruct annotation processor _generation_ and ↵Sven Gothel2014-05-111-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated_class_user due to Java8 issues. Java8's annotation processor as embedded within javac does not allow referencing not-yet existing generated classes in a class source code which will produce these generated classes via the annotation process. Example: +++ import com.jogamp.gluegen.structgen.CStruct; public class Lala { @CStruct(name="RenderingConfig", header="TestStruct01.h") public RenderingConfig config; } +++ Above example illustrates that the type 'RenderingConfig' does not exist at time of processing the annotation. The type will be created via the annotation process itself. Even though we pass '-proc:only', i.e. skip java compilation, Java8's annotation processing via javac fails in such case. We see this as a bug within javac's annotation processing itself! +++ This workaround splits the annotation process and using the class as generated by the former. To allow this to work, CStruct receives a new field 'jname' allowing to enforce the java-name of the structure using a dummy field type like boolean. @CStruct(name="RenderingConfig", jname="RenderingConfig", header="TestStruct01.h") public boolean dummy; Further more CStruct can be annotated on the package, i.e. 'package-info.java', avoiding the dependency problem altogether. To support multiple header files and types, 'CStructs' has been introduced using an array of 'CStruct'. @CStructs({@CStruct(name="RenderingConfig", header="TestStruct01.h"), @CStruct(name="Pixel", header="TestStruct02.h")}) package com.jogamp.gluegen.test.junit.structgen; Tests: - Build w/ Java7 and Java8 - Validated 'major version 50' (Java 6) class files (OK)
* Refine test/TestMultiAndFatJar: Demoing test class outside of fat and multi jarSven Gothel2014-01-243-11/+28
| | | | | | | | Use 'output' folder - Copy jogl-test.jar and junit.jar to output, to be used in executing (run-*.sh) Works here ..
* Bug 846: Add manual test case for One-Jar (using 0.97.1)Sven Gothel2013-10-0120-3/+454
| | | | | | Note: One-Jar lacks support of a URL handler for it's jar-in-jar files and hence we would need to extract the jar-in-jar resources w/ our TempJarCache from one one-jar file .. too bad. Looks like it's incomplete.
* Bug 845: Fix JNILibLoaderBase.addNativeJarLibsImpl(..) fat-jar case.Sven Gothel2013-10-013-0/+63
| | | | | | | | | | | Always use the jar-basename when calling TempJarCache.addNativeLibs(..), otherwise it is mapped and loaded multiple times leading to different native libraries. Simplify addNativeJarLibsImpl(..) argument semantics by passing complete jarBasename and nativeJarBasename (w/ suffix). Added manual test scripts validating [gluegen + jogl] usage with multi (Bug 843) and fat (Bug 845) jar configurations.
* Bug 752: Review Code Vulnerabilities (Permission Checks of new exposed code ↵Sven Gothel2013-06-113-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and privileged access) This review focuses on how we perform permission checks, or better - do we circumvent some assuming full privileges ? Some native methods do need extra permission validation, i.e. loading native libraries. Further more AccessController.doPrivileged(..) shall not cover generic code exposing a critical feature to the user. Further more .. we should rely on the SecuritManager, i.e. AccessControlContext's 'checkPermission(Permission)' code to comply w/ fine grained permission access. It is also possible to have full permission w/o having any certificates (-> policy file). +++ We remove implicit AccessController.doPrivileged(..) from within our trusted code for generic methods, like Property access, temp. files. +++ SecurityUtil: - Remove 'getCommonAccessControlContext(Class<?> clz)', which returned a local AccessControlContext for later restriction if the passed class contains all certificates as the 'trusted' GlueGen class has. - Simply expose convenient permission check methods relying on SecurityManager / AccessControlContext. PropertyAccess: - 'protected static void addTrustedPrefix(..)' requires AllPermissions if SecurityManager is installed. - Remove implicit doPrivileged(..) triggered by passed AccessControlContext instance, only leave it for trusted prefixes. IOUtil: - Remove all doPrivileged(..) - Elevation shall be performed by caller. DynamicLinker: - 'public long openLibraryLocal(..)' and 'public long openLibraryGlobal(..)' may throw SecurityException, if a SecurityManager is installed and the dyn. link permission is not granted in the calling code. Implemented in their respective Unix, OSX and Windows manifestation. Caller has to elevate privileges via 'doPrivileged(..) {}' ! +++ Tests: - Property access - File access - Native library loading Manual Applet test (unsigned, but w/ SecurityManager and policy file): > gluegen/test/applet Applet has been tested w/ signed JAR w/ Firefox and Java7 on GNU/Linux as well. Manual Application test (unsigned, but w/ SecurityManager and policy file): com.jogamp.junit.sec.TestSecIOUtil01 - Run w/ SecurityManager and policy file: - gluegen/scripts/runtest-secmgr.sh - Run w/o SecurityManager: - gluegen/scripts/runtest.sh
* gluegen: remove executable bit from java and c source filesHarvey Harrison2013-04-091-0/+0
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Add 'TestJarsInJar.jar' test JAR file for upcoming JarUtil tests (Jar in Jar).Sven Gothel2011-11-295-0/+57
|
* Android: Use NDK default gcc settingsSven Gothel2011-10-181-0/+1
|
* Adding native crosscompile test to ubuntu/armv7 and android/armv7Sven Gothel2011-07-2311-0/+552
|
* Add native alignment test c-codeSven Gothel2011-07-171-0/+65
|
* Disabled Struct* Tests (not working on Windows .. platform; Moved ↵Sven Gothel2010-11-259-620/+0
| | | | BuffersTest and PCPP to the proper src/junit folder. All junit tests are now handled by build-junit.xml
* PCPP: Let '#error token' throw an exception with the message; Note: #warning ↵Sven Gothel2010-11-082-2/+6
| | | | needs to be quoted when having seperators
* Gluegen/PCPP: Refined PCPP if-elif-else-endif ; Add 'dumpCPP' option to ↵Sven Gothel2010-11-071-1/+1
| | | | direct PCPP to dump the output to stderr as well
* Fix PCPP encapsualted if/if blocksSven Gothel2010-11-072-1/+86
|
* PCPP Test: Add ifndef testsSven Gothel2010-11-072-1/+24
|
* Fix testSven Gothel2010-11-071-2/+3
|
* PCPP: Fix ifdef/ifndef, if, elif and endif correct ; Enhanced PCPP testsSven Gothel2010-11-072-6/+60
|
* com.sun -> com.jogampSven Gothel2010-11-0714-0/+0
|
* Renamed com.sun.gluegen -> com.jogamp.gluegenSven Gothel2010-11-067-17/+19
|
* LICENSE.txt changes:Sven Gothel2010-09-147-0/+196
| | | | | | | | | | | | | - 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.
* added slice utility methods to Buffers + rudimentary test.Michael Bien2010-07-041-0/+29
|
* added BasicProcAddressEmitterTest testing generation of ProcAddressTable and ↵Michael Bien2010-06-183-3/+104
| | | | method RenameJavaMethod property.
* fixed handling of size_t which was broken since the introduction of Int64Buffer.Michael Bien2010-05-312-0/+6
|
* Put junit.jar 4.8.2, antlr.jar 2.7.7 into make/lib, and use it as the ↵Sven Gothel2010-05-121-1/+1
| | | | default, if not specified otherwise in /home/sven/gluegen.properties
* Move HashMapTest to junit.run; Unify classes to only 'Test' in their name if ↵Sven Gothel2010-05-102-334/+0
| | | | they are a junit test.
* switched to nanoTime() and moved asserts to end of the benchmark.Michael Bien2010-04-272-37/+35
|
* IntIntHashMap (and friends) is now Iterable. Added iterator testcase.Michael Bien2010-04-212-4/+61
|
* added Simon Goller to @author list in LongIntHashMap und LongIntHashMapTest.Michael Bien2010-04-121-0/+1
|
* IntIntHashMap changed to LongIntHashMap.Simon Goller2010-04-121-0/+139
|
* annotated certain token in IntIntHashMap for text substitution.Michael Bien2010-04-081-3/+3
| | | | build generates now via text substitution IntLong- and IntObjectHashmap in the pre-build phase.
* initial import of IntIntHashmap + JUnitTest including a benchmark.Michael Bien2010-04-081-0/+139
|
* http://jogamp.org/bugzilla/show_bug.cgi?id=393Sven Gothel2010-04-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. +++
* introduced com.jogamp.common.{nio,os} packages and moved some classes.Michael Bien2010-03-312-2/+4
|
* reduced verbosity in test output.Michael Bien2010-03-313-6/+5
|
* renamed BufferFactory into Buffers.Michael Bien2010-03-291-2/+2
|
* renamed com.sun.gluegen.runtime -> com.jogamp.gluegen.runtime.Michael Bien2010-03-271-2/+2
|
* ant-junit-ant: use rel gluegen.root pathSven Gothel2010-03-262-3/+2
|
* http://www.jogamp.org/bugzilla/show_bug.cgi?id=390Sven Gothel2010-03-252-3/+3
| | | | | | | | | | | | | | | | | Adding 'plain' junit tests. Plain stands for the simple processing of: ant.junit.compile: gluegen -> java/c files, javac/cc, jar ant.junit.run: junit batch run Avoiding 'black magic', ie kicking off gluegen and ant-compilation from within the junit tests. Same methodology as the JOGL junit tests, junit test sources are under 'src/junit' This way, the migration to other platform tests might be easier, as well as the we don't need to pass through ant properties (ant - junit - ant), see 3a32650d4229f9b4ad1f527d9e30c24ddb69bb3f.
* http://www.jogamp.org/bugzilla/show_bug.cgi?id=390Sven Gothel2010-03-254-20/+38
| | | | | | | | | | | | | | | | The current junit tests use a fixed 'build' sub-path, not the customizing 'rootrel.build' path. More properties needs to be passed through (ant -> junit -> ant) to comply with the current build system: * rootrel.build * os.arch * gluegen.user.compiler.file Fixed .. However .. since even more properties may influence the build, a more native solution with just plain 'ant' might be more desireable ..
* fixed regression in constant emission where a type suffix (e.g. 'f') was ↵Michael Bien2010-03-222-9/+16
| | | | | | illegally added after a closing bracket. added testcase.
* fixed JavaEmitter to support unsigned defines.Michael Bien2010-03-121-0/+1
|
* added PCPPTest.Michael Bien2010-02-202-0/+55
|
* fixed jdk tools.jar classpath for hudson to fix tests.Michael Bien2010-02-121-2/+2
|
* junit test code cleanup and some build preperations for hudson.Michael Bien2010-02-124-53/+71
|
* added test target to main build script.Michael Bien2010-02-1210-211/+430
| | | | | added StructAccessorTest, refactored other tests. updated project files, paths etc.
* added first JUnit test: GlueGenTest.java. (dependencies: junit-4.5.jar, ↵Michael Bien2009-10-185-0/+333
| | | | | | | antlr-2.7.7.jar in <gluegenroot>/lib) Test tests the basic GlueGen lifecycle: generate->compile java->compile native->load lib->call methods integrated test compile,run and debug targets into NetBeans IDE.
* Build CDC named JARs for CVM in default build, no more specialized build ↵sg2158892009-07-152-66/+0
| | | | necessary. Fix PointerBuffer allocateDirect()
* Add: Extended support for CVM:sg2158892009-07-132-0/+66
| | | | | | | | | | | | | | | | - GLX, CGL, WGL - GL2ES12 desktop ES1 and ES2 common profile Add: BufferFactory: Determine the Buffer's Endianess Add: com.sun.gluegen.runtime.PointerBuffer - Solution for CDC/CVM (no LongBuffer), holds a buffer of pointer objects in native endian format and converts natively passed 32bit pointers to 64 bit. - supports a few Buffer mechanics, so the BufferFactory can easily use them. - behaves as an NIO Buffer, code generation - included a unit test Add: StructAccessor get/set long value, incl. endian check
* Copied JOGL_2_SANDBOX r145 on to trunk; JOGL_2_SANDBOX branch is now closedKenneth Russel2009-06-152-0/+24
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@147 a78bb65f-1512-4460-ba86-f6dc96a7bf27