Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) TestMultiVector

 

TestMultiVector is a tool to test the MultiVector class.

 

 

 

 

 

TestMultiVector downloads

 

 

 

 

 

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./ToolTestMultiVector/ToolTestMultiVectorConsole.pro

 

include(../../DesktopApplication.pri)
include(../../Libraries/Boost.pri)
include(../../Libraries/BigInteger.pri)
include(../../Libraries/GeneralConsole.pri)

include(../../Classes/CppMultiVector/CppMultiVector.pri)

include(../../Tools/ToolTestMultiVector/ToolTestMultiVectorConsole.pri)

SOURCES += main.cpp

 

 

 

 

 

./ToolTestMultiVector/ToolTestMultiVectorConsole.pri

 

INCLUDEPATH += \
    ../../Tools/ToolTestMultiVector

SOURCES += \
    ../../Tools/ToolTestMultiVector/testmultivectormenudialog.cpp

HEADERS += \
    ../../Tools/ToolTestMultiVector/testmultivectormenudialog.h

OTHER_FILES += \
    ../../Tools/ToolTestMultiVector/Licence.txt

 

 

 

 

 

./ToolTestMultiVector/main.cpp

 

//---------------------------------------------------------------------------
/*
TestMultiVector, tests the MultiVector class
Copyright (C) 2011-2015  Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program 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 this program.If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolTestMultiVector.htm
//---------------------------------------------------------------------------
#include <cassert>
#include "multivector.h"

int main()
{
  ribi::TestMultiVector();
}

 

 

 

 

 

./ToolTestMultiVector/testmultivectormenudialog.h

 

#ifndef TOOLTESTMULTIVECTORMENUDIALOG_H
#define TOOLTESTMULTIVECTORMENUDIALOG_H

#include "menudialog.h"


namespace ribi {

struct TestMultiVectorMenuDialog final : public ::ribi::MenuDialog
{
  TestMultiVectorMenuDialog();
  About GetAbout() const noexcept override;
  Help GetHelp() const noexcept override;
  boost::shared_ptr<const Program> GetProgram() const noexcept override;
  std::string GetVersion() const noexcept override;
  std::vector<std::string> GetVersionHistory() const noexcept override;

  private:
  int ExecuteSpecific(const std::vector<std::string>& argv) noexcept override;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif
};

} //~namespace ribi

#endif // TOOLTESTMULTIVECTORMENUDIALOG_H

 

 

 

 

 

./ToolTestMultiVector/testmultivectormenudialog.cpp

 

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#include "testmultivectormenudialog.h"

#include <cassert>
#include <iostream>

#include <boost/units/unit.hpp>
#include <boost/units/systems/si.hpp>

#include "multivector.h"
#include "richelbilderbeekprogram.h"
#include "trace.h"
#include "testtimer.h"

#pragma GCC diagnostic pop

ribi::TestMultiVectorMenuDialog::TestMultiVectorMenuDialog()
{
  #ifndef NDEBUG
  Test();
  #endif
}

int ribi::TestMultiVectorMenuDialog::ExecuteSpecific(const std::vector<std::string>& argv) noexcept
{
  const int argc = static_cast<int>(argv.size());
  if (argc == 1)
  {
    std::cout << GetHelp() << '\n';
    return 1;
  }
  assert(!"TODO");
  return 1;
}

ribi::About ribi::TestMultiVectorMenuDialog::GetAbout() const noexcept
{
  About a(
    "Richel Bilderbeek",
    "ToolTestMultiVector",
    "tests the MultiVector class",
    "the 14th of June 2015",
    "2015-2015",
    "http://www.richelbilderbeek.nl/ToolTestMultiVector.htm",
    GetVersion(),
    GetVersionHistory());
  a.AddLibrary("MultiVector version: " + MultiVector<int>::GetVersion());
  a.AddLibrary("Trace version: " + Trace::GetVersion());
  return a;
}

ribi::Help ribi::TestMultiVectorMenuDialog::GetHelp() const noexcept
{
  return Help(
    this->GetAbout().GetFileTitle(),
    this->GetAbout().GetFileDescription(),
    {

    },
    {

    }
  );
}

boost::shared_ptr<const ribi::Program> ribi::TestMultiVectorMenuDialog::GetProgram() const noexcept
{
  const boost::shared_ptr<const Program> p {
    new ProgramTestMultiVector
  };
  assert(p);
  return p;
}

std::string ribi::TestMultiVectorMenuDialog::GetVersion() const noexcept
{
  return "1.0";
}

std::vector<std::string> ribi::TestMultiVectorMenuDialog::GetVersionHistory() const noexcept
{
  return {
    "2015-06-14: version 1.0: initial versioning",
  };
}

#ifndef NDEBUG
void ribi::TestMultiVectorMenuDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  {
    TestMultiVector();
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
}
#endif

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml