lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 7067c2a3 2/4: Add a {.hpp, .cpp, _test.cpp} a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 7067c2a3 2/4: Add a {.hpp, .cpp, _test.cpp} archetype
Date: Wed, 10 Aug 2022 10:53:48 -0400 (EDT)

branch: master
commit 7067c2a3fc3cbd87ca8a7bea1f30068d27ffe9af
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Add a {.hpp,.cpp,_test.cpp} archetype
---
 Makefile.am        |  9 +++++++++
 archetype.cpp      | 24 ++++++++++++++++++++++++
 archetype.hpp      | 27 +++++++++++++++++++++++++++
 archetype_test.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 objects.make       |  6 ++++++
 5 files changed, 114 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 4c006c25..1b97c9ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,6 +100,7 @@ TESTS = \
     actuarial_table_test \
     alert_test \
     any_member_test \
+    archetype_test \
     assert_lmi_test \
     authenticity_test \
     bin_exp_test \
@@ -623,6 +624,13 @@ alert_test_LDADD = \
 any_member_test_LDADD = \
   libtest_common.la
 
+archetype_test_SOURCES = \
+  archetype.cpp \
+  archetype_test.cpp
+archetype_test_CXXFLAGS = $(AM_CXXFLAGS)
+archetype_test_LDADD = \
+  libtest_common.la
+
 assert_lmi_test_LDADD = \
   libtest_common.la
 
@@ -1150,6 +1158,7 @@ noinst_HEADERS = \
     alert.hpp \
     any_entity.hpp \
     any_member.hpp \
+    archetype.hpp \
     assert_lmi.hpp \
     authenticity.hpp \
     basic_tables.hpp \
diff --git a/archetype.cpp b/archetype.cpp
new file mode 100644
index 00000000..e7541355
--- /dev/null
+++ b/archetype.cpp
@@ -0,0 +1,24 @@
+// [describe purpose].
+//
+// Copyright (C) 2022 Gregory W. Chicares.
+//
+// This program 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.
+//
+// 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, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// https://savannah.nongnu.org/projects/lmi
+// email: <gchicares@sbcglobal.net>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+#include "pchfile.hpp"
+
+#include "archetype.hpp"
diff --git a/archetype.hpp b/archetype.hpp
new file mode 100644
index 00000000..9378da6d
--- /dev/null
+++ b/archetype.hpp
@@ -0,0 +1,27 @@
+// [describe purpose].
+//
+// Copyright (C) 2022 Gregory W. Chicares.
+//
+// This program 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.
+//
+// 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, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// https://savannah.nongnu.org/projects/lmi
+// email: <gchicares@sbcglobal.net>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+#ifndef archetype_hpp
+#define archetype_hpp
+
+#include "config.hpp"
+
+#endif // archetype_hpp
diff --git a/archetype_test.cpp b/archetype_test.cpp
new file mode 100644
index 00000000..b2a113bf
--- /dev/null
+++ b/archetype_test.cpp
@@ -0,0 +1,48 @@
+// [describe purpose]--unit test.
+//
+// Copyright (C) 2022 Gregory W. Chicares.
+//
+// This program 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.
+//
+// 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, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// https://savannah.nongnu.org/projects/lmi
+// email: <gchicares@sbcglobal.net>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+#include "pchfile.hpp"
+
+#include "archetype.hpp"
+
+#include "test_tools.hpp"
+
+class archetype_test
+{
+  public:
+    static void test()
+        {
+        test_something();
+        }
+
+  private:
+    static void test_something();
+};
+
+void archetype_test::test_something()
+{
+}
+
+int test_main(int, char*[])
+{
+    archetype_test::test();
+    return EXIT_SUCCESS;
+}
diff --git a/objects.make b/objects.make
index fe98addf..50d45a52 100644
--- a/objects.make
+++ b/objects.make
@@ -373,6 +373,7 @@ unit_test_targets := \
   actuarial_table_test \
   alert_test \
   any_member_test \
+  archetype_test \
   assert_lmi_test \
   authenticity_test \
   bin_exp_test \
@@ -497,6 +498,11 @@ any_member_test$(EXEEXT): \
   null_stream.o \
   path_utility.o \
 
+archetype_test$(EXEEXT): \
+  $(common_test_objects) \
+  archetype.o \
+  archetype_test.o \
+
 assert_lmi_test$(EXEEXT): \
   $(common_test_objects) \
   assert_lmi_test.o \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]