harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r529042 - in /harmony/enhanced/drlvm/trunk/src/test/regression/H1654: ./ H1654Test.java readme.txt
Date Sun, 15 Apr 2007 18:13:37 GMT
Author: ndbeyer
Date: Sun Apr 15 11:13:36 2007
New Revision: 529042

URL: http://svn.apache.org/viewvc?view=rev&rev=529042
Log:
Apply patch for HARMONY-3522 - [drlvm][regression tests] A regression test for HARMONY-1654
should be created

Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H1654/
    harmony/enhanced/drlvm/trunk/src/test/regression/H1654/H1654Test.java   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H1654/readme.txt   (with props)

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H1654/H1654Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H1654/H1654Test.java?view=auto&rev=529042
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H1654/H1654Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H1654/H1654Test.java Sun Apr 15 11:13:36
2007
@@ -0,0 +1,19 @@
+package org.apache.harmony.drlvm.tests.regression.h1654;
+
+import junit.framework.TestCase;
+import java.security.*;
+
+public class H1654Test extends TestCase {
+
+    public void test1() {
+        ProtectionDomain pd = H1654Test.class.getProtectionDomain();
+        System.out.println(pd.getPermissions().toString());
+        boolean permissionGranted = pd.getPermissions().toString().indexOf("java.lang.RuntimePermission
exitVM") != -1;
+        assertTrue("permission was not granted", permissionGranted);
+    }
+
+    public void test2() {
+        ProtectionDomain pd = H1654Test.class.getProtectionDomain();
+        assertTrue("pd does not imply the exitVM permission ", pd.implies(new RuntimePermission("exitVM")));
+    }
+}

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H1654/H1654Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H1654/readme.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H1654/readme.txt?view=auto&rev=529042
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H1654/readme.txt (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H1654/readme.txt Sun Apr 15 11:13:36
2007
@@ -0,0 +1 @@
+Test was taken from src/test/harmony-1654 Test2.java

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H1654/readme.txt
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message