diff options
Diffstat (limited to 'storage/tokudb/PerconaFT/src/tests/test_db_version.cc')
-rw-r--r-- | storage/tokudb/PerconaFT/src/tests/test_db_version.cc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/storage/tokudb/PerconaFT/src/tests/test_db_version.cc b/storage/tokudb/PerconaFT/src/tests/test_db_version.cc new file mode 100644 index 00000000000..78909a14bb0 --- /dev/null +++ b/storage/tokudb/PerconaFT/src/tests/test_db_version.cc @@ -0,0 +1,61 @@ +/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: +#ident "$Id$" +/*====== +This file is part of PerconaFT. + + +Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. + + PerconaFT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License, version 2, + as published by the Free Software Foundation. + + PerconaFT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PerconaFT. If not, see <http://www.gnu.org/licenses/>. + +---------------------------------------- + + PerconaFT is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License, version 3, + as published by the Free Software Foundation. + + PerconaFT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with PerconaFT. If not, see <http://www.gnu.org/licenses/>. +======= */ + +#ident "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved." + +#include "test.h" + +#include <db.h> + + + +int +test_main (int argc, char *const argv[]) { + const char *v; + int major, minor, patch; + parse_args(argc, argv); + v = db_version(0, 0, 0); + assert(v!=0); + v = db_version(&major, &minor, &patch); + assert(major==DB_VERSION_MAJOR); + assert(minor==DB_VERSION_MINOR); + assert(patch==DB_VERSION_PATCH); + if (verbose) { + printf("%d.%d.%d\n", major, minor, patch); + printf("%s\n", v); + } + return 0; +} |