aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/java/com/healthmarketscience/jackcess
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2011-04-08 12:40:52 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2011-04-08 12:40:52 +0000
commitc10c32949f369d7f1b3fa6c6d90eba88c89a38ac (patch)
treeec4d8ea54812644e74f28e12d205889b091ad810 /test/src/java/com/healthmarketscience/jackcess
parent4523f0e90997ac50e948d0bbd69aa3a892f08611 (diff)
downloadjackcess-c10c32949f369d7f1b3fa6c6d90eba88c89a38ac.tar.gz
jackcess-c10c32949f369d7f1b3fa6c6d90eba88c89a38ac.zip
add 2010 unit tests
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@550 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test/src/java/com/healthmarketscience/jackcess')
-rw-r--r--test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java5
-rw-r--r--test/src/java/com/healthmarketscience/jackcess/IndexTest.java3
-rw-r--r--test/src/java/com/healthmarketscience/jackcess/UsageMapTest.java3
3 files changed, 7 insertions, 4 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java
index 52c7b60..26c35ff 100644
--- a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java
+++ b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java
@@ -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"));
}
diff --git a/test/src/java/com/healthmarketscience/jackcess/IndexTest.java b/test/src/java/com/healthmarketscience/jackcess/IndexTest.java
index 5e67022..1e326c3 100644
--- a/test/src/java/com/healthmarketscience/jackcess/IndexTest.java
+++ b/test/src/java/com/healthmarketscience/jackcess/IndexTest.java
@@ -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);
diff --git a/test/src/java/com/healthmarketscience/jackcess/UsageMapTest.java b/test/src/java/com/healthmarketscience/jackcess/UsageMapTest.java
index a2321d1..87fa5c3 100644
--- a/test/src/java/com/healthmarketscience/jackcess/UsageMapTest.java
+++ b/test/src/java/com/healthmarketscience/jackcess/UsageMapTest.java
@@ -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);
}