zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #04837
[Branch ~zeitgeist/zeitgeist/bluebird] Rev 400: Fix TableLookup test after schema changes, and sort Makefile.am
------------------------------------------------------------
revno: 400
committer: Siegfried-Angel Gevatter Pujals <siegfried@xxxxxxxxxxxx>
branch nick: bluebird
timestamp: Mon 2012-02-13 20:43:15 +0100
message:
Fix TableLookup test after schema changes, and sort Makefile.am
alfabetically while we're at it.
modified:
test/direct/Makefile.am
test/direct/table-lookup-test.vala
--
lp:zeitgeist
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'test/direct/Makefile.am'
--- test/direct/Makefile.am 2012-02-05 14:52:13 +0000
+++ test/direct/Makefile.am 2012-02-13 19:43:15 +0000
@@ -10,10 +10,10 @@
TESTS = \
marshalling-test \
+ mimetype-test \
query-operators-test \
+ table-lookup-test \
where-clause-test \
- table-lookup-test \
- mimetype-test \
$(NULL)
SRC_FILES = \
@@ -56,19 +56,19 @@
DISTCLEANFILES = \
marshalling-test \
+ mimetype-test \
query-operators-test \
+ table-lookup-test \
where-clause-test \
- table-lookup-test \
- mimetype-test \
$(NULL)
EXTRA_DIST = \
+ assertions.vapi \
marshalling-test.vala \
+ mimetype-test.vala \
query-operators-test.vala \
+ table-lookup-test.vala \
where-clause-test.vala \
- table-lookup-test.vala \
- mimetype-test.vala \
- assertions.vapi \
$(NULL)
VALA_V = $(VALA_V_$(V))
=== modified file 'test/direct/table-lookup-test.vala'
--- test/direct/table-lookup-test.vala 2012-02-05 14:52:13 +0000
+++ test/direct/table-lookup-test.vala 2012-02-13 19:43:15 +0000
@@ -56,16 +56,16 @@
unowned Sqlite.Database db = database.database;
TableLookup table_lookup = new TableLookup (database, "actor");
- assert_cmpint (table_lookup.get_id ("1st-actor"), OperatorType.EQUAL, 1);
- assert_cmpint (table_lookup.get_id ("2nd-actor"), OperatorType.EQUAL, 2);
- assert_cmpint (table_lookup.get_id ("1st-actor"), OperatorType.EQUAL, 1);
+ int id = table_lookup.get_id ("1st-actor");
+ assert_cmpint (table_lookup.get_id ("2nd-actor"), OperatorType.EQUAL, id+1);
+ assert_cmpint (table_lookup.get_id ("1st-actor"), OperatorType.EQUAL, id);
int rc = db.exec ("DELETE FROM actor WHERE value='1st-actor'");
assert (rc == Sqlite.OK);
table_lookup.remove (1);
- assert_cmpint (table_lookup.get_id ("2nd-actor"), OperatorType.EQUAL, 2);
- assert_cmpint (table_lookup.get_id ("1st-actor"), OperatorType.EQUAL, 3);
+ assert_cmpint (table_lookup.get_id ("2nd-actor"), OperatorType.EQUAL, id+1);
+ assert_cmpint (table_lookup.get_id ("1st-actor"), OperatorType.EQUAL, id+2);
}
public void engine_test ()
@@ -82,8 +82,6 @@
int rc = db.exec ("DELETE FROM actor WHERE value='something'");
assert (rc == Sqlite.OK);
- assert_cmpint (
- table_lookup.get_id ("sqlite-reuses-the-id"), OperatorType.EQUAL, 1);
assert_cmpint (table_lookup.get_id ("something"), OperatorType.EQUAL, 2);
}