From dfd31745f6ebee0696d67f044085b96e43aa8ee1 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Tue, 29 Nov 2022 22:27:27 -0600 Subject: Add tests for C++ unit test library --- testsuite/libdejagnu/unit-cxx.cxx | 57 +++++++++++++++++++++++++++++++++++++++ testsuite/libdejagnu/unit.exp | 6 +++-- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 testsuite/libdejagnu/unit-cxx.cxx (limited to 'testsuite') diff --git a/testsuite/libdejagnu/unit-cxx.cxx b/testsuite/libdejagnu/unit-cxx.cxx new file mode 100644 index 0000000..fecf550 --- /dev/null +++ b/testsuite/libdejagnu/unit-cxx.cxx @@ -0,0 +1,57 @@ +// Exerciser for Dejagnu C++ unit test support library +// +// Copyright (C) 2022 Free Software Foundation, Inc. +// +// This file is part of DejaGnu. +// +// DejaGnu 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. +// +// DejaGnu 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 DejaGnu; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. +// +// This file was written by Jacob Bachmeyer. + +#include +#include + +#include "dejagnu.h" + +TestState DGT; + +int +main(int argc, char ** argv) +{ + if (argc < 2) { + std::cerr <<"usage: " <..."<