src/scripts/java
tests/*.class
tests/regression/*.class
+tests/regression/assertion/*.class
+tests/regression/assertion/packagetest/*.class
+tests/regression/bugzilla/*.class
tests/regression/codepatching/*.class
tests/regression/jasmin/*.class
tests/regression/native/*.class
[src/vmcore/Makefile]
[tests/Makefile]
[tests/regression/Makefile]
+ [tests/regression/bugzilla/Makefile]
[tests/regression/codepatching/Makefile]
[tests/regression/assertion/Makefile]
[tests/regression/jasmin/Makefile]
void array_objectarray_element_set(java_handle_objectarray_t *a, int32_t index, java_handle_t *value)
{
- arraydescriptor *ad;
- classinfo *cc;
- int32_t size;
+ int32_t size;
if (a == NULL) {
exceptions_throw_nullpointerexception();
return;
}
- /* TODO Write inline functions for that and use LLNI. */
-
- LLNI_CRITICAL_START;
-
- ad = a->header.objheader.vftbl->arraydesc;
- cc = ad->componentvftbl->class;
+ /* Sanity check. */
- LLNI_CRITICAL_END;
+ assert(a->header.objheader.vftbl->arraydesc->arraytype == ARRAYTYPE_OBJECT);
- if (ad->arraytype == ARRAYTYPE_OBJECT) {
- if (value != NULL) {
- if (builtin_instanceof(value, cc) == false) {
- exceptions_throw_illegalargumentexception();
- return;
- }
+ if (value != NULL) {
+ if (builtin_canstore(a, value) == false) {
+ exceptions_throw_illegalargumentexception();
+ return;
}
}
SUBDIRS = \
assertion \
+ bugzilla \
codepatching \
jasmin \
native \
--- /dev/null
+/* tests/regression/bugzilla/All.java - runs all CACAO regression unit tests
+
+ Copyright (C) 2008
+ CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+*/
+
+
+import junit.framework.*;
+import junit.textui.*;
+
+public class All extends TestCase {
+ /**
+ * Runs all CACAO regression unit tests using
+ * junit.textui.TestRunner
+ */
+ public static void main(String[] args) {
+ Test s = suite();
+ TestRunner.run(s);
+ }
+
+ /**
+ * Collects all CACAO regression unit tests as one suite
+ */
+ public static Test suite() {
+ TestSuite suite = new TestSuite("CACAO Regression Unit Tests");
+
+ // Add your test here.
+
+ suite.addTest(new TestSuite(PR52.class));
+
+ return suite;
+ }
+}
--- /dev/null
+## tests/regression/bugzilla/Makefile.am
+##
+## Copyright (C) 2008
+## CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+##
+## This file is part of CACAO.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2, or (at
+## your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+
+
+JAVA = $(top_builddir)/src/cacao/cacao
+JAVACMD = $(JAVA) -Xbootclasspath:$(BOOTCLASSPATH)
+JAVACCMD = $(JAVAC) -bootclasspath $(BOOTCLASSPATH)
+
+EXTRA_DIST = \
+ *.java
+
+CLEANFILES = \
+ *.class
+
+build:
+ $(JAVACCMD) -cp /usr/share/java/junit4.jar -d . *.java
+
+check: build
+ LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs $(JAVACMD) -cp /usr/share/java/junit4.jar:. org.junit.runner.JUnitCore All
+
+
+## Local variables:
+## mode: Makefile
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End:
--- /dev/null
+/* tests/regression/bugzilla/PR52.java
+
+ Copyright (C) 2008
+ CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+*/
+
+
+import junit.framework.*;
+import junit.textui.*;
+
+import java.security.*;
+
+public class PR52 extends TestCase {
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite() {
+ return new TestSuite(PR52.class);
+ }
+
+ public void test() {
+ // This one only triggers with GNU Classpath.
+ AccessController.getContext();
+ }
+}