aboutsummaryrefslogtreecommitdiffstats
path: root/src/junit/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-26 05:53:39 +0200
committerSven Gothel <[email protected]>2014-09-26 05:53:39 +0200
commit86541252028e0b2093b87836732924b6746858ca (patch)
treef9101a7f82c064d47ae544e790586d1782b809e7 /src/junit/com
parentae17a5895088e321bc373318cc1e144a2f822f29 (diff)
Adapt unit tests to commit 1350823035597f784f9cf871aa487f896f3d1840: getTempDir(..) throws IOException
Diffstat (limited to 'src/junit/com')
-rw-r--r--src/junit/com/jogamp/junit/sec/Applet01.java11
-rw-r--r--src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java11
2 files changed, 22 insertions, 0 deletions
diff --git a/src/junit/com/jogamp/junit/sec/Applet01.java b/src/junit/com/jogamp/junit/sec/Applet01.java
index f0188a2..2312aa4 100644
--- a/src/junit/com/jogamp/junit/sec/Applet01.java
+++ b/src/junit/com/jogamp/junit/sec/Applet01.java
@@ -111,6 +111,17 @@ public class Applet01 extends Applet {
System.err.println("Unexpected exception for secure temp dir");
se0.printStackTrace();
}
+ } catch (final SecurityException e) {
+ se0 = e;
+ if( !isSecure ) {
+ System.err.println("Expected exception for insecure temp dir (2)");
+ System.err.println("Message: "+se0.getMessage());
+ } else {
+ System.err.println("Unexpected exception for secure temp dir (2)");
+ se0.printStackTrace();
+ }
+ } catch (final IOException e) {
+ throw new RuntimeException(e); // oops
}
if( isSecure ) {
if( null != se0 ) {
diff --git a/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java b/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java
index b347680..a36b50b 100644
--- a/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java
+++ b/src/junit/com/jogamp/junit/sec/TestSecIOUtil01.java
@@ -123,6 +123,17 @@ public class TestSecIOUtil01 extends JunitTracer {
System.err.println("Unexpected exception for secure temp dir");
se0.printStackTrace();
}
+ } catch (final SecurityException e) {
+ se0 = e;
+ if( !isSecure ) {
+ System.err.println("Expected exception for insecure temp dir (2)");
+ System.err.println("Message: "+se0.getMessage());
+ } else {
+ System.err.println("Unexpected exception for secure temp dir (2)");
+ se0.printStackTrace();
+ }
+ } catch (final IOException e) {
+ throw new RuntimeException(e); // oops
}
if( isSecure ) {
Assert.assertNull("AccessControlException thrown on secure temp dir", se0);