Skip to content

Commit

Permalink
Merge master into release/1
Browse files Browse the repository at this point in the history
--HG--
branch : release
  • Loading branch information
kazssym committed Jun 24, 2020
2 parents 8815f2a + 6f09b7a commit 8d9d24c
Show file tree
Hide file tree
Showing 59 changed files with 8,992 additions and 76 deletions.
16 changes: 12 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
runtest
assertion.la
example.la
libcppunitx.la
Makefile
config.status
config.h
Expand All @@ -11,13 +8,24 @@ config.h.in
configure
aclocal.m4
stamp-*
.dirstamp
Debug
Release
LibrarySupport
_build
.vs
.libs
.deps
.env
*.trs
*.log
*.pc
*.la
*.a
*.lo
*.o
*.tvsconfig
*.local
*.user
*.cache
*.rej
*.orig
Expand Down
16 changes: 12 additions & 4 deletions .hgignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
syntax: regexp
(^|/)runtest$
(^|/)assertion\.la$
(^|/)example\.la$
(^|/)libcppunitx\.la$
(^|/)Makefile$
(^|/)config\.status$
(^|/)config\.h$
Expand All @@ -12,13 +9,24 @@ syntax: regexp
(^|/)configure$
(^|/)aclocal\.m4$
(^|/)stamp-[^/]*$
(^|/)\.dirstamp$
(^|/)Debug$
(^|/)Release$
(^|/)LibrarySupport$
(^|/)_build$
(^|/)\.vs$
(^|/)\.libs$
(^|/)\.deps$
(^|/)\.env$
\.trs$
\.log$
\.pc$
\.la$
\.a$
\.lo$
\.o$
\.tvsconfig$
\.local$
\.user$
\.cache$
\.rej$
\.orig$
Expand Down
1 change: 1 addition & 0 deletions .hgtags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
25ee843f907eb7376ad6f1af1aa15d40622062bb release/1-alpha.1
26 changes: 23 additions & 3 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"configurations": [
{
"name": "POSIX",
"intelliSenseMode": "clang-x64",
"name": "POSIX (GCC)",
"compilerPath": "/usr/bin/gcc",
"includePath": [
"${workspaceFolder}",
"${workspaceFolder}/libcppunitx"
"${workspaceFolder}/libcppunitx",
"${workspaceFolder}/libltdl"
],
"defines": [
"HAVE_CONFIG_H"
Expand All @@ -18,6 +19,25 @@
],
"limitSymbolsToIncludedHeaders": true
}
},
{
"name": "Win32 (MSVC)",
"intelliSenseMode": "msvc-x64",
"includePath": [
"${workspaceFolder}",
"${workspaceFolder}/libcppunitx",
"${workspaceFolder}/libltdl"
],
"defines": [
],
"cStandard": "c11",
"cppStandard": "c++11",
"browse": {
"path": [
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
],
"version": 4
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"**/*.rej": true,
"**/*.orig": true,
"**/*~": true
}
},
"restructuredtext.confPath": "${workspaceFolder}/sphinx"
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"clean",
"check"
],
"group": "build",
"group": "none",
"problemMatcher": [
"$gcc"
]
Expand Down
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Process this file with automake to produce a Makefile.in.
## Process this file with automake to produce Makefile.in.

ACLOCAL_AMFLAGS = -Im4

EXTRA_DIST = README.md

SUBDIRS = libcppunitx test doc
SUBDIRS = libltdl libcppunitx test doc

dist-hook: $(distdir)/SHA256SUMS
dist-hook:: $(distdir)/SHA256SUMS
if test -n "$$GPG_USERNAME"; then \
gpg -ba -u "$$GPG_USERNAME" $(distdir)/SHA256SUMS; \
fi
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# this notice are preserved. This file is offered as-is, without any warranty.
---
variables:
package.distName: cppunitx-1-alpha.1
package.distName: cppunitx-1-alpha.2
trigger:
- master
- release/*
Expand All @@ -33,7 +33,7 @@ stages:
texinfo
displayName: Install build dependencies
- bash: |
autoreconf --install
autoreconf
displayName: Bootstrap
- bash: |
./configure --disable-static
Expand Down
20 changes: 13 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([C++UnitX], [1-alpha.1],
AC_INIT([C++UnitX], [1-alpha.2],
[https://bitbucket.org/kazssym/cppunitx/issues/new], [cppunitx],
[https://www.vx68k.org/cppunitx])
AC_CONFIG_SRCDIR([libcppunitx/registry.cpp])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_MACRO_DIR([m4])
LT_PREREQ([2.4.6])
LT_INIT([dlopen])
AM_INIT_AUTOMAKE([foreign no-define tar-ustar])
LT_CONFIG_LTDL_DIR([libltdl])
LTDL_INIT([recursive])
AM_INIT_AUTOMAKE([foreign no-define subdir-objects tar-ustar])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_CHECK_LIB([ltdl], [lt_dlopen], [LIBLTDL=-lltdl], [LIBLTDL=])
AC_SUBST([LIBLTDL])dnl
AC_CHECK_HEADERS([ltdl.h])
AC_CONFIG_FILES([Makefile libcppunitx/Makefile test/Makefile doc/Makefile])
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
# Configuration actions.
AC_CONFIG_FILES([Makefile libcppunitx/Makefile
libltdl/Makefile test/Makefile doc/Makefile])
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT
2 changes: 1 addition & 1 deletion doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Process this file with automake to produce a Makefile.in.
## Process this file with automake to produce Makefile.in.

AUTOMAKE_OPTIONS = no-installinfo

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# docker-compose.yml
# Copyright (C) 2017-2019 Kaz Nishimura
# Copyright (C) 2017-2020 Kaz Nishimura
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
Expand All @@ -9,7 +9,7 @@ version: "2.4"
services:
builder:
build:
context: gcc
context: docker/gcc
image: kazssym/cppunitx-builder:gcc
network_mode: host
volumes:
Expand Down
3 changes: 3 additions & 0 deletions docker/gcc/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.rej
*.orig
*~
14 changes: 8 additions & 6 deletions gcc/Dockerfile → docker/gcc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Dockerfile for the CppUnitX builder image
# Copyright (C) 2018 Kaz Nishimura
# Copyright (C) 2018-2020 Kaz Nishimura
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

FROM gcc:7
FROM gcc:latest

RUN set -x && \
apt-get update && \
apt-get install --assume-yes --no-install-recommends \
texinfo texlive && \
rm -rf /var/lib/apt/lists/*
apt-get update -q && \
apt-get install -qy --no-install-recommends \
texinfo \
texlive \
&& \
rm -rf /var/lib/apt/lists/*

ENV TEX=dviluatex PDFTEX=luatex
3 changes: 0 additions & 3 deletions gcc/.dockerignore

This file was deleted.

28 changes: 24 additions & 4 deletions libcppunitx/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
## Process this file with automake to produce a Makefile.in.
## Process this file with automake to produce Makefile.in.

AM_CPPFLAGS = -D_CPPUNITX_IMPLEMENTATION
AM_CPPFLAGS = -D_CPPUNITX_IMPLEMENTATION \
$(LTDLINCL)

pkgconfigdir = $(libdir)/pkgconfig

EXTRA_DIST = cppunitx.pc.in

lib_LTLIBRARIES = libcppunitx.la

pkgconfig_DATA = cppunitx.pc

nobase_include_HEADERS = \
cppunitx/exception \
cppunitx/assertion \
Expand All @@ -19,10 +26,23 @@ bits/cppunitx/driver.h \
bits/cppunitx/module.h
noinst_HEADERS = ltdl_utility.h

libcppunitx_la_LDFLAGS = -version-info 0:0:0 $(LTLDFLAGS)
libcppunitx_la_LDFLAGS = -version-info 0:0:0
libcppunitx_la_LIBADD = $(LIBLTDL)
libcppunitx_la_SOURCES = \
assert.cpp \
exception.cpp \
assertion.cpp \
registry.cpp \
test.cpp \
context.cpp \
driver.cpp

CLEANFILES = $(pkgconfig_DATA)

cppunitx.pc: $(srcdir)/cppunitx.pc.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status --file=$(subdir)/$@

installcheck-local::
if test -n '$(PKG_CONFIG)'; then \
export PKG_CONFIG_PATH=$(pkgconfigdir); \
$(PKG_CONFIG) --exists --exact-version=$(VERSION) cppunitx; \
fi
2 changes: 1 addition & 1 deletion libcppunitx/assert.cpp → libcppunitx/assertion.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// assert.cpp
// assertion.cpp
// Copyright (C) 2020 Kaz Nishimura
//
// This program is free software: you can redistribute it and/or modify it
Expand Down
17 changes: 9 additions & 8 deletions libcppunitx/bits/cppunitx/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ namespace cppunitx
using inherited = runtime_error;

public:
explicit AssertionError(const char *message)
: inherited {message}
{
}
explicit AssertionError(const char *message);

explicit AssertionError(const std::string &message)
: inherited {message}
{
}
explicit AssertionError(const std::string &message);

public:
/// Destructs an `AssertionError` object.
///
/// This destructor is defined out of line so that this class can be
/// provided by a shared library.
virtual ~AssertionError() noexcept;
};
}

Expand Down
2 changes: 1 addition & 1 deletion libcppunitx/bits/cppunitx/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern "C" cppunitx::TestRegistry *cppunitx_registry();

class SUITE;

_CPPUNITX_PUBLIC cppunitx::TestRegistry *cppunitx_registry()
cppunitx::TestRegistry *cppunitx_registry()
{
return cppunitx::TestRegistry::getInstance<class SUITE>().get();
}
Expand Down
10 changes: 10 additions & 0 deletions libcppunitx/cppunitx.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@

Name: cppunitx
Description: C++UnitX library
Version: @VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lcppunitx
39 changes: 39 additions & 0 deletions libcppunitx/exception.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// exception.cpp
// Copyright (C) 2020 Kaz Nishimura
//
// 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/>.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#if HAVE_CONFIG_H
#include <config.h>
#endif

#include <bits/cppunitx/exception.h>

using namespace cppunitx;

AssertionError::AssertionError(const char *message)
: inherited {message}
{
}

AssertionError::AssertionError(const std::string &message)
: inherited {message}
{
}

AssertionError::~AssertionError() noexcept
{
}
Loading

0 comments on commit 8d9d24c

Please sign in to comment.