Skip to content

Commit

Permalink
Fix ODBC tests for get_affected_rows case
Browse files Browse the repository at this point in the history
  • Loading branch information
mloskot committed Feb 18, 2013
1 parent e7c4cac commit 7092093
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
10 changes: 7 additions & 3 deletions src/backends/odbc/test/test-odbc-mssql.cpp
Expand Up @@ -88,6 +88,11 @@ class test_context : public test_context_base
return new table_creator_three(s);
}

table_creator_base * table_creator_4(session& s) const
{
return new table_creator_for_get_affected_rows(s);
}

std::string to_date_time(std::string const &datdt_string) const
{
return "convert(datetime, \'" + datdt_string + "\', 120)";
Expand All @@ -96,7 +101,6 @@ class test_context : public test_context_base

int main(int argc, char** argv)
{

#ifdef _MSC_VER
// Redirect errors, unrecoverable problems, and assert() failures to STDERR,
// instead of debug message window.
Expand All @@ -121,7 +125,7 @@ int main(int argc, char** argv)
test_context tc(backEnd, connectString);
common_tests tests(tc);
tests.run();

std::cout << "\nOK, all tests passed.\n\n";
return EXIT_SUCCESS;
}
Expand All @@ -141,4 +145,4 @@ int main(int argc, char** argv)
std::cout << "STD::EXECEPTION " << e.what() << '\n';
}
return EXIT_FAILURE;
}
}
14 changes: 1 addition & 13 deletions src/backends/odbc/test/test-odbc-mysql.cpp
Expand Up @@ -88,16 +88,6 @@ class test_context : public test_context_base
return new table_creator_three(s);
}

table_creator_base * table_creator_4(session& s) const
{
return new table_creator_three(s);
}

table_creator_base * tableCreator3(session& s) const
{
return new table_creator_for_get_affected_rows(s);
}

table_creator_base * table_creator_4(session& s) const
{
return new table_creator_for_get_affected_rows(s);
Expand All @@ -107,12 +97,10 @@ class test_context : public test_context_base
{
return "\'" + datdt_string + "\'";
}

};

int main(int argc, char** argv)
{

#ifdef _MSC_VER
// Redirect errors, unrecoverable problems, and assert() failures to STDERR,
// instead of debug message window.
Expand Down Expand Up @@ -153,4 +141,4 @@ int main(int argc, char** argv)
std::cout << "STD::EXECEPTION " << e.what() << '\n';
}
return EXIT_FAILURE;
}
}

0 comments on commit 7092093

Please sign in to comment.