From 35662787f479b93b3205310934574132609461cc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 8 Nov 2011 12:36:25 +0200 Subject: Get rid of special tracer database The include, types, and pragma tests have been moved to the common/ directory while the object test has been merged into common/lifecycle. The transaction test will be re-implemented as common/ test as soon as SQL statement tracing support is merged. --- tracer/types/driver.cxx | 35 ---------------- tracer/types/makefile | 104 ------------------------------------------------ tracer/types/test.hxx | 69 -------------------------------- tracer/types/test.std | 0 4 files changed, 208 deletions(-) delete mode 100644 tracer/types/driver.cxx delete mode 100644 tracer/types/makefile delete mode 100644 tracer/types/test.hxx delete mode 100644 tracer/types/test.std (limited to 'tracer/types') diff --git a/tracer/types/driver.cxx b/tracer/types/driver.cxx deleted file mode 100644 index 9c1b97d..0000000 --- a/tracer/types/driver.cxx +++ /dev/null @@ -1,35 +0,0 @@ -// file : tracer/types/driver.cxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -// Test C++ type handling (anonymous types, aliasing). -// - -#include -#include -#include - -#include "test.hxx" -#include "test-odb.hxx" - -using namespace std; -using namespace odb::core; - -template -struct same_p -{ - static const bool result = false; -}; - -template -struct same_p -{ - static const bool result = true; -}; - -int -main () -{ - assert ((same_p::id_type, int>::result)); -} diff --git a/tracer/types/makefile b/tracer/types/makefile deleted file mode 100644 index 2a7ceb5..0000000 --- a/tracer/types/makefile +++ /dev/null @@ -1,104 +0,0 @@ -# file : tracer/types/makefile -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -driver := $(out_base)/driver -dist := $(out_base)/.dist -test := $(out_base)/.test -clean := $(out_base)/.clean - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -$(call import,\ - $(scf_root)/import/libodb/stub.make,\ - l: odb.l,cpp-options: odb.l.cpp-options) - -$(call import,\ - $(scf_root)/import/libodb-tracer/stub.make,\ - l: odb_tracer.l,cpp-options: odb_tracer.l.cpp-options) - -# Build. -# -$(driver): $(cxx_obj) $(odb_tracer.l) $(odb.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -genf := $(addprefix $(odb_hdr:.hxx=-odb),.hxx .ixx .cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database tracer -$(gen): cpp_options := -I$(src_base) -$(gen): $(odb_tracer.l.cpp-options) $(odb.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/tracer/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - -# Test. -# -$(test): $(driver) $(src_base)/test.std - $(call message,test $<,$< >$(out_base)/test.out) - $(call message,,diff -u $(src_base)/test.std $(out_base)/test.out) - $(call message,,rm -f $(out_base)/test.out) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addprefix $(out_base)/,$(odb_hdr:.hxx=-odb.cxx.hxx.clean)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(odb_rules)) -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) diff --git a/tracer/types/test.hxx b/tracer/types/test.hxx deleted file mode 100644 index c37692b..0000000 --- a/tracer/types/test.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// file : tracer/types/test.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST_HXX -#define TEST_HXX - -#include - -#ifdef ODB_COMPILER -typedef int int_t; -typedef short num_t; -#else -typedef int num_t; -#endif - -typedef num_t num_type; - -#pragma db object -struct object1 -{ - typedef int int_type; - - #pragma db id - int_type id_; -}; - -#pragma db object -struct object2 -{ - #pragma db id - num_type num_; -}; - -// Template-id with "inner" name (compilation test). -// -template -struct num_wrap -{ -#ifdef ODB_COMPILER - typedef num_wrap this_type; -#endif - - X v_; -}; - -template -std::ostream& -operator<< (std::ostream& os, const num_wrap& x) -{ - return os << x.v_; -} - -template -bool -operator== (const num_wrap& x, const num_wrap& y) -{ - return x.v_ == y.v_; -} - -#pragma db object -struct object3 -{ - #pragma db id - num_wrap num_; -}; - -#endif // TEST_HXX diff --git a/tracer/types/test.std b/tracer/types/test.std deleted file mode 100644 index e69de29..0000000 -- cgit v1.1