2021-05-10 20:08:50 +02:00
|
|
|
/*
|
|
|
|
* This file is a part of PikoTools
|
2022-06-30 13:44:21 +02:00
|
|
|
* and is distributed under the 2-Clause BSD licence.
|
2021-05-10 20:08:50 +02:00
|
|
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
*
|
2022-06-30 13:44:21 +02:00
|
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer.
|
2021-05-10 20:08:50 +02:00
|
|
|
*
|
2022-06-30 13:44:21 +02:00
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2021-05-10 20:08:50 +02:00
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
2022-06-30 13:44:21 +02:00
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
2021-05-10 20:08:50 +02:00
|
|
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
2022-06-30 13:44:21 +02:00
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
2021-05-10 20:08:50 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "convert.h"
|
2021-05-18 23:57:58 +02:00
|
|
|
#include "mainoptionsparser.h"
|
2021-05-19 03:26:46 +02:00
|
|
|
#include "csvparser.h"
|
2021-05-10 20:08:50 +02:00
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
2021-05-18 22:57:26 +02:00
|
|
|
|
2021-05-10 20:08:50 +02:00
|
|
|
namespace pt
|
|
|
|
{
|
2021-06-14 13:48:32 +02:00
|
|
|
bool was_error = false;
|
|
|
|
int test_counter = 0;
|
|
|
|
const char * test_msg = nullptr;
|
2021-05-10 20:08:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-05-18 22:57:26 +02:00
|
|
|
int main(int argc, const char ** argv)
|
2021-05-10 20:08:50 +02:00
|
|
|
{
|
|
|
|
pt::pt_convert_tests::make_tests();
|
2021-05-18 23:57:58 +02:00
|
|
|
pt::pt_mainoptions_tests::make_tests();
|
2021-05-19 03:26:46 +02:00
|
|
|
pt::pt_csvparser_tests::make_tests();
|
2021-05-10 20:08:50 +02:00
|
|
|
|
|
|
|
if( pt::was_error )
|
|
|
|
{
|
|
|
|
std::cout << "some of the tests failed" << std::endl;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
std::cout << "*********************************" << std::endl;
|
|
|
|
std::cout << "* all tests passed successfully *" << std::endl;
|
|
|
|
std::cout << "*********************************" << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
return !pt::was_error ? 0 : 1;
|
|
|
|
}
|