mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 796878 - test-qofsession fails on x86_32.
This commit is contained in:
@@ -170,20 +170,22 @@ TEST (QofSessionTest, clear_error)
|
||||
|
||||
TEST (QofSessionTest, load)
|
||||
{
|
||||
// We register a provider that gives a backend that
|
||||
// throws an error on load.
|
||||
// This error during load should cause the qof session to
|
||||
// "roll back" the book load.
|
||||
/* We register a provider that gives a backend that throws an error on load.
|
||||
* This error during load should cause the qof session to destroy the book
|
||||
* and create a new one.
|
||||
*/
|
||||
qof_backend_register_provider (get_provider ());
|
||||
QofSession s;
|
||||
s.begin ("book1", false, false, false);
|
||||
auto book = s.get_book ();
|
||||
s.load (nullptr);
|
||||
EXPECT_EQ (book, s.get_book ());
|
||||
EXPECT_NE (book, s.get_book ());
|
||||
|
||||
// Now we'll do the load without returning an error from the backend,
|
||||
// and ensure that it's the original book and that it's not empty.
|
||||
/* Now we'll do the load without returning an error from the backend,
|
||||
* and ensure that it's the new book from the previous test.
|
||||
*/
|
||||
load_error = false;
|
||||
book = s.get_book();
|
||||
s.load (nullptr);
|
||||
EXPECT_EQ (book, s.get_book ());
|
||||
EXPECT_EQ (s.get_error(), ERR_BACKEND_NO_ERR);
|
||||
|
||||
Reference in New Issue
Block a user