]> source.dussan.org Git - jackcess.git/commitdiff
add 2010 unit tests
authorJames Ahlborn <jtahlborn@yahoo.com>
Fri, 8 Apr 2011 12:40:52 +0000 (12:40 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Fri, 8 Apr 2011 12:40:52 +0000 (12:40 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@550 f203690c-595d-4dc9-a70b-905162fa7fd2

18 files changed:
test/data/V2010/bigIndexTestV2010.accdb [new file with mode: 0755]
test/data/V2010/compIndexTestV2010.accdb [new file with mode: 0755]
test/data/V2010/delColTestV2010.accdb [new file with mode: 0755]
test/data/V2010/delTestV2010.accdb [new file with mode: 0755]
test/data/V2010/fixedNumericTestV2010.accdb [new file with mode: 0755]
test/data/V2010/fixedTextTestV2010.accdb [new file with mode: 0755]
test/data/V2010/indexCursorTestV2010.accdb [new file with mode: 0755]
test/data/V2010/indexTestV2010.accdb [new file with mode: 0755]
test/data/V2010/overflowTestV2010.accdb [new file with mode: 0755]
test/data/V2010/queryTestV2010.accdb [new file with mode: 0755]
test/data/V2010/test2V2010.accdb [new file with mode: 0755]
test/data/V2010/testIndexCodesV2010.accdb
test/data/V2010/testIndexPropertiesV2010.accdb [new file with mode: 0755]
test/data/V2010/testPromotionV2010.accdb [new file with mode: 0755]
test/data/V2010/testV2010.accdb [new file with mode: 0755]
test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java
test/src/java/com/healthmarketscience/jackcess/IndexTest.java
test/src/java/com/healthmarketscience/jackcess/UsageMapTest.java

diff --git a/test/data/V2010/bigIndexTestV2010.accdb b/test/data/V2010/bigIndexTestV2010.accdb
new file mode 100755 (executable)
index 0000000..34a84fb
Binary files /dev/null and b/test/data/V2010/bigIndexTestV2010.accdb differ
diff --git a/test/data/V2010/compIndexTestV2010.accdb b/test/data/V2010/compIndexTestV2010.accdb
new file mode 100755 (executable)
index 0000000..8749eea
Binary files /dev/null and b/test/data/V2010/compIndexTestV2010.accdb differ
diff --git a/test/data/V2010/delColTestV2010.accdb b/test/data/V2010/delColTestV2010.accdb
new file mode 100755 (executable)
index 0000000..17e6410
Binary files /dev/null and b/test/data/V2010/delColTestV2010.accdb differ
diff --git a/test/data/V2010/delTestV2010.accdb b/test/data/V2010/delTestV2010.accdb
new file mode 100755 (executable)
index 0000000..4c97d9e
Binary files /dev/null and b/test/data/V2010/delTestV2010.accdb differ
diff --git a/test/data/V2010/fixedNumericTestV2010.accdb b/test/data/V2010/fixedNumericTestV2010.accdb
new file mode 100755 (executable)
index 0000000..e35db22
Binary files /dev/null and b/test/data/V2010/fixedNumericTestV2010.accdb differ
diff --git a/test/data/V2010/fixedTextTestV2010.accdb b/test/data/V2010/fixedTextTestV2010.accdb
new file mode 100755 (executable)
index 0000000..7415f5c
Binary files /dev/null and b/test/data/V2010/fixedTextTestV2010.accdb differ
diff --git a/test/data/V2010/indexCursorTestV2010.accdb b/test/data/V2010/indexCursorTestV2010.accdb
new file mode 100755 (executable)
index 0000000..9b151e9
Binary files /dev/null and b/test/data/V2010/indexCursorTestV2010.accdb differ
diff --git a/test/data/V2010/indexTestV2010.accdb b/test/data/V2010/indexTestV2010.accdb
new file mode 100755 (executable)
index 0000000..48d73f6
Binary files /dev/null and b/test/data/V2010/indexTestV2010.accdb differ
diff --git a/test/data/V2010/overflowTestV2010.accdb b/test/data/V2010/overflowTestV2010.accdb
new file mode 100755 (executable)
index 0000000..fa3e5ef
Binary files /dev/null and b/test/data/V2010/overflowTestV2010.accdb differ
diff --git a/test/data/V2010/queryTestV2010.accdb b/test/data/V2010/queryTestV2010.accdb
new file mode 100755 (executable)
index 0000000..e1cc51b
Binary files /dev/null and b/test/data/V2010/queryTestV2010.accdb differ
diff --git a/test/data/V2010/test2V2010.accdb b/test/data/V2010/test2V2010.accdb
new file mode 100755 (executable)
index 0000000..512258d
Binary files /dev/null and b/test/data/V2010/test2V2010.accdb differ
index 4392378de9c0af475124a4b41d4bac498f145d24..8cf261f0e366e970ab23d2ed8273879245aa722e 100644 (file)
Binary files a/test/data/V2010/testIndexCodesV2010.accdb and b/test/data/V2010/testIndexCodesV2010.accdb differ
diff --git a/test/data/V2010/testIndexPropertiesV2010.accdb b/test/data/V2010/testIndexPropertiesV2010.accdb
new file mode 100755 (executable)
index 0000000..cbf9ce0
Binary files /dev/null and b/test/data/V2010/testIndexPropertiesV2010.accdb differ
diff --git a/test/data/V2010/testPromotionV2010.accdb b/test/data/V2010/testPromotionV2010.accdb
new file mode 100755 (executable)
index 0000000..858cc37
Binary files /dev/null and b/test/data/V2010/testPromotionV2010.accdb differ
diff --git a/test/data/V2010/testV2010.accdb b/test/data/V2010/testV2010.accdb
new file mode 100755 (executable)
index 0000000..179486a
Binary files /dev/null and b/test/data/V2010/testV2010.accdb differ
index 52c7b602785f19f9c5c5ea10363e7e8ce82068c4..26c35ff896b419e84cb6d28c36b007ec8ee97394 100644 (file)
@@ -997,11 +997,10 @@ public class DatabaseTest extends TestCase {
     for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) {
       Database db = create(fileFormat);
 
-      if (!FileFormat.V2003.equals(fileFormat)
-              && !FileFormat.V2007.equals(fileFormat)) {
+      if (fileFormat.ordinal() < FileFormat.V2003.ordinal()) {
         assertNotNull("file format: " + fileFormat, db.getSystemTable("MSysAccessObjects"));
       } else {
-        // v2003, v2007 template files have no "MSysAccessObjects" table
+        // v2003+ template files have no "MSysAccessObjects" table
         assertNull("file format: " + fileFormat, db.getSystemTable("MSysAccessObjects"));
       }
 
index 5e6702206bc7d8490bf62f6e655d47ee9f084f34..1e326c395b3350faa176461aeec97cbdb45a5189 100644 (file)
@@ -392,7 +392,8 @@ public class IndexTest extends TestCase {
 
       final Map<String,Object> row = c.getCurrentRow();
       // Row order is arbitrary, so v2007 row order difference is valid
-      if (Database.FileFormat.V2007.equals(testDB.getExpectedFileFormat())) {
+      if (testDB.getExpectedFileFormat().ordinal() >= 
+          Database.FileFormat.V2007.ordinal()) {
         DatabaseTest.checkTestDBTable1RowA(testDB, table, row);
       } else {
         DatabaseTest.checkTestDBTable1RowABCDEFG(testDB, table, row);
index a2321d16b2adaecf92dcbfe28231e2d653c6291f..87fa5c30293e95f2c7257b666623599a8947a4a9 100644 (file)
@@ -28,6 +28,9 @@ public final class UsageMapTest extends TestCase {
             } else if (Database.FileFormat.V2007.equals(expectedFileFormat)) {
                 expectedFirstPage = 94;
                 expectedLastPage = 511;
+            } else if (Database.FileFormat.V2010.equals(expectedFileFormat)) {
+                expectedFirstPage = 109;
+                expectedLastPage = 511;
             } else {
                 throw new IllegalAccessException("Unknown file format: " + expectedFileFormat);
             }