aboutsummaryrefslogtreecommitdiff
path: root/tests/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compiler')
-rw-r--r--tests/compiler/cxx-indenter/buildfile1
-rw-r--r--tests/compiler/cxx-indenter/driver.cxx8
-rw-r--r--tests/compiler/cxx-indenter/makefile70
-rw-r--r--tests/compiler/makefile17
-rw-r--r--tests/compiler/sloc-counter/buildfile1
-rw-r--r--tests/compiler/sloc-counter/driver.cxx9
-rw-r--r--tests/compiler/sloc-counter/makefile70
-rw-r--r--tests/compiler/sloc-counter/test.cxx5
-rw-r--r--tests/compiler/sloc-counter/testscript1
-rw-r--r--tests/compiler/traversal/buildfile1
-rw-r--r--tests/compiler/traversal/driver.cxx10
-rw-r--r--tests/compiler/traversal/makefile70
12 files changed, 20 insertions, 243 deletions
diff --git a/tests/compiler/cxx-indenter/buildfile b/tests/compiler/cxx-indenter/buildfile
index ed0bfd1..a0d6dfa 100644
--- a/tests/compiler/cxx-indenter/buildfile
+++ b/tests/compiler/cxx-indenter/buildfile
@@ -1,5 +1,4 @@
# file : tests/compiler/cxx-indenter/buildfile
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : MIT; see accompanying LICENSE file
import libs = libcutl%lib{cutl}
diff --git a/tests/compiler/cxx-indenter/driver.cxx b/tests/compiler/cxx-indenter/driver.cxx
index f86ba06..a0e8be2 100644
--- a/tests/compiler/cxx-indenter/driver.cxx
+++ b/tests/compiler/cxx-indenter/driver.cxx
@@ -1,12 +1,14 @@
// file : tests/compiler/cxx-indenter/driver.cxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : MIT; see accompanying LICENSE file
#include <fstream>
#include <iostream>
-#include <cutl/compiler/code-stream.hxx>
-#include <cutl/compiler/cxx-indenter.hxx>
+#include <libcutl/compiler/code-stream.hxx>
+#include <libcutl/compiler/cxx-indenter.hxx>
+
+#undef NDEBUG
+#include <cassert>
using namespace std;
using namespace cutl::compiler;
diff --git a/tests/compiler/cxx-indenter/makefile b/tests/compiler/cxx-indenter/makefile
deleted file mode 100644
index f1b99b4..0000000
--- a/tests/compiler/cxx-indenter/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/compiler/cxx-indenter/makefile
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
-# license : MIT; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-
-#
-#
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-cutl.l := $(out_root)/cutl/cutl.l
-cutl.l.cpp-options := $(out_root)/cutl/cutl.l.cpp-options
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(driver): $(cxx_obj) $(cutl.l)
-$(cxx_obj) $(cxx_od): $(cutl.l.cpp-options)
-
-
-$(call include-dep,$(cxx_od))
-
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/output.std
- $(call message,test $$1,$$1 | diff -u $(src_base)/output.std -,$(driver))
-
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od))
-
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/cutl/makefile)
diff --git a/tests/compiler/makefile b/tests/compiler/makefile
deleted file mode 100644
index 7c98c20..0000000
--- a/tests/compiler/makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-# file : tests/compiler/makefile
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
-# license : MIT; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-tests := cxx-indenter sloc-counter traversal
-
-default := $(out_base)/
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests)))
-$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests)))
-$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests)))
-
-$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile))
diff --git a/tests/compiler/sloc-counter/buildfile b/tests/compiler/sloc-counter/buildfile
index 071127c..bc84884 100644
--- a/tests/compiler/sloc-counter/buildfile
+++ b/tests/compiler/sloc-counter/buildfile
@@ -1,5 +1,4 @@
# file : tests/compiler/sloc-counter/buildfile
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : MIT; see accompanying LICENSE file
import libs = libcutl%lib{cutl}
diff --git a/tests/compiler/sloc-counter/driver.cxx b/tests/compiler/sloc-counter/driver.cxx
index ecb7a69..b888d42 100644
--- a/tests/compiler/sloc-counter/driver.cxx
+++ b/tests/compiler/sloc-counter/driver.cxx
@@ -1,14 +1,15 @@
// file : tests/compiler/sloc-counter/driver.cxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : MIT; see accompanying LICENSE file
#include <fstream>
#include <sstream>
-#include <cassert>
#include <iostream>
-#include <cutl/compiler/code-stream.hxx>
-#include <cutl/compiler/sloc-counter.hxx>
+#include <libcutl/compiler/code-stream.hxx>
+#include <libcutl/compiler/sloc-counter.hxx>
+
+#undef NDEBUG
+#include <cassert>
using namespace std;
using namespace cutl::compiler;
diff --git a/tests/compiler/sloc-counter/makefile b/tests/compiler/sloc-counter/makefile
deleted file mode 100644
index b393c20..0000000
--- a/tests/compiler/sloc-counter/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/compiler/sloc-counter/makefile
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
-# license : MIT; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-
-#
-#
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-cutl.l := $(out_root)/cutl/cutl.l
-cutl.l.cpp-options := $(out_root)/cutl/cutl.l.cpp-options
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(driver): $(cxx_obj) $(cutl.l)
-$(cxx_obj) $(cxx_od): $(cutl.l.cpp-options)
-
-
-$(call include-dep,$(cxx_od))
-
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/test.cxx $(src_base)/test.std
- $(call message,test $$1,$$1 $(src_base)/test.cxx | diff -u $(src_base)/test.std -,$(driver))
-
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od))
-
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/cutl/makefile)
diff --git a/tests/compiler/sloc-counter/test.cxx b/tests/compiler/sloc-counter/test.cxx
index ff0f5b2..70201ee 100644
--- a/tests/compiler/sloc-counter/test.cxx
+++ b/tests/compiler/sloc-counter/test.cxx
@@ -12,6 +12,9 @@
#include <iostream>
+#undef NDEBUG
+#include <cassert>
+
char str[] = "multi\
line\
string\
@@ -25,7 +28,7 @@ int main(
char* argv[] /*array*/)
{
/* comment start */ int x = 0;
- char* s =
+ char* s =
/* comment start */"foo";
int y = 2
/* tricky stuff *//
diff --git a/tests/compiler/sloc-counter/testscript b/tests/compiler/sloc-counter/testscript
index 9b7eea3..7509df5 100644
--- a/tests/compiler/sloc-counter/testscript
+++ b/tests/compiler/sloc-counter/testscript
@@ -1,5 +1,4 @@
# file : tests/compiler/sloc-counter/testscript
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : MIT; see accompanying LICENSE file
# @@ BUG: adding blank lines at the end increases the count.
diff --git a/tests/compiler/traversal/buildfile b/tests/compiler/traversal/buildfile
index 597b976..920c03e 100644
--- a/tests/compiler/traversal/buildfile
+++ b/tests/compiler/traversal/buildfile
@@ -1,5 +1,4 @@
# file : tests/compiler/traversal/buildfile
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
# license : MIT; see accompanying LICENSE file
import libs = libcutl%lib{cutl}
diff --git a/tests/compiler/traversal/driver.cxx b/tests/compiler/traversal/driver.cxx
index 8ed8577..f8b0c84 100644
--- a/tests/compiler/traversal/driver.cxx
+++ b/tests/compiler/traversal/driver.cxx
@@ -1,14 +1,16 @@
// file : tests/compiler/traversal/driver.cxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : MIT; see accompanying LICENSE file
#include <vector>
#include <iostream>
-#include <cutl/shared-ptr.hxx>
+#include <libcutl/shared-ptr.hxx>
-#include <cutl/compiler/type-info.hxx>
-#include <cutl/compiler/traversal.hxx>
+#include <libcutl/compiler/type-info.hxx>
+#include <libcutl/compiler/traversal.hxx>
+
+#undef NDEBUG
+#include <cassert>
using namespace std;
using namespace cutl;
diff --git a/tests/compiler/traversal/makefile b/tests/compiler/traversal/makefile
deleted file mode 100644
index 731d1da..0000000
--- a/tests/compiler/traversal/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-# file : tests/compiler/traversal/makefile
-# copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
-# license : MIT; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make
-
-cxx_tun := driver.cxx
-
-#
-#
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
-cxx_od := $(cxx_obj:.o=.o.d)
-
-cutl.l := $(out_root)/cutl/cutl.l
-cutl.l.cpp-options := $(out_root)/cutl/cutl.l.cpp-options
-
-driver := $(out_base)/driver
-test := $(out_base)/.test
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(driver): $(cxx_obj) $(cutl.l)
-$(cxx_obj) $(cxx_od): $(cutl.l.cpp-options)
-
-
-$(call include-dep,$(cxx_od))
-
-
-# Alias for default target.
-#
-$(out_base)/: $(driver)
-
-
-# Test.
-#
-$(test): driver := $(driver)
-$(test): $(driver) $(src_base)/output.std
- $(call message,test $$1,$$1 | diff -u $(src_base)/output.std -,$(driver))
-
-
-# Clean.
-#
-$(clean): \
- $(driver).o.clean \
- $(addsuffix .cxx.clean,$(cxx_obj)) \
- $(addsuffix .cxx.clean,$(cxx_od))
-
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/cutl/makefile)