diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 | 
| commit | bada6666c70977a058755ccf232e7d67b24adeed (patch) | |
| tree | 1e92d50cebce96abaf9bce19e36026c47f77b9ba /libxsd-frontend/tests | |
| parent | eaf34adcbd8095bc6d1f3371b1227f654c7b19fc (diff) | |
New upstream release
Diffstat (limited to 'libxsd-frontend/tests')
| -rw-r--r-- | libxsd-frontend/tests/dump/driver.cxx | 93 | ||||
| -rw-r--r-- | libxsd-frontend/tests/dump/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/annotation/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/anonymous/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/attribute-group/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/default/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/element-group/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/enumeration/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/makefile | 3 | ||||
| -rw-r--r-- | libxsd-frontend/tests/schema/union/makefile | 3 | 
11 files changed, 52 insertions, 71 deletions
| diff --git a/libxsd-frontend/tests/dump/driver.cxx b/libxsd-frontend/tests/dump/driver.cxx index 5217ebf..dd925a9 100644 --- a/libxsd-frontend/tests/dump/driver.cxx +++ b/libxsd-frontend/tests/dump/driver.cxx @@ -1,10 +1,8 @@  // file      : tests/dump/driver.cxx -// author    : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  // license   : GNU GPL v2 + exceptions; see accompanying LICENSE file -#include <cult/types.hxx> - +#include <xsd-frontend/types.hxx>  #include <xsd-frontend/parser.hxx>  #include <xsd-frontend/transformations/anonymous.hxx>  #include <xsd-frontend/transformations/enum-synthesis.hxx> @@ -14,19 +12,15 @@  #include <iostream> -using namespace Cult::Types; +using namespace std;  using namespace XSDFrontend; -using std::wcerr; -using std::wcout; -using std::endl; - -UnsignedLong indent = 0; +static unsigned long indent;  std::wostream&  ind (std::wostream& os)  { -  for (UnsignedLong n (0); n < indent; ++n) +  for (unsigned long n (0); n < indent; ++n)      os << L"  ";    return os; @@ -34,8 +28,6 @@ ind (std::wostream& os)  namespace  { -  typedef Cult::Types::WideString String; -    // Nameable which is named in the namespace scope.    //    String @@ -48,7 +40,7 @@ namespace    struct List: Traversal::List    { -    virtual Void +    virtual void      traverse (Type& l)      {        if (l.annotated_p ()) @@ -78,7 +70,7 @@ namespace    struct Union: Traversal::Union    { -    virtual Void +    virtual void      traverse (Type& u)      {        if (u.annotated_p ()) @@ -114,7 +106,7 @@ namespace    struct Enumerator: Traversal::Enumerator    { -    virtual Void +    virtual void      traverse (Type& e)      {        if (e.annotated_p ()) @@ -127,7 +119,7 @@ namespace    struct Enumeration: Traversal::Enumeration    { -    virtual Void +    virtual void      traverse (Type& e)      {        if (e.annotated_p ()) @@ -149,7 +141,7 @@ namespace    struct ContainsParticle: Traversal::ContainsParticle    { -    virtual Void +    virtual void      traverse (Type& cp)      {        wcout << ind << "[" << cp.min () << ", "; @@ -165,7 +157,7 @@ namespace    struct ContainsCompositor: Traversal::ContainsCompositor    { -    virtual Void +    virtual void      traverse (Type& cc)      {        wcout << ind << "[" << cc.min () << ", "; @@ -183,7 +175,7 @@ namespace                       Traversal::Choice,                       Traversal::Sequence    { -    virtual Void +    virtual void      traverse (SemanticGraph::All& a)      {        wcout << "all" << endl @@ -198,7 +190,7 @@ namespace        wcout << ind << "}" << endl;      } -    virtual Void +    virtual void      traverse (SemanticGraph::Choice& c)      {        wcout << "choice" << endl @@ -213,7 +205,7 @@ namespace        wcout << ind << "}" << endl;      } -    virtual Void +    virtual void      traverse (SemanticGraph::Sequence& s)      {        wcout << "sequence" << endl @@ -231,7 +223,7 @@ namespace    struct Attribute: Traversal::Attribute    { -    virtual Void +    virtual void      traverse (Type& a)      {        if (a.annotated_p ()) @@ -266,7 +258,7 @@ namespace    struct AnyAttribute: Traversal::AnyAttribute    { -    virtual Void +    virtual void      traverse (Type& a)      {        if (a.annotated_p ()) @@ -279,7 +271,7 @@ namespace    struct Element: Traversal::Element    { -    virtual Void +    virtual void      traverse (Type& e)      {        wcout << "element " << e.name (); @@ -309,7 +301,7 @@ namespace    struct ElementFlat: Traversal::Element    { -    virtual Void +    virtual void      traverse (Type& e)      {        if (e.annotated_p ()) @@ -329,7 +321,7 @@ namespace    struct Any: Traversal::Any    { -    virtual Void +    virtual void      traverse (Type& a)      {        wcout << "any '" << a.name () << "'" << endl; @@ -338,7 +330,7 @@ namespace    struct AnyFlat: Traversal::Any    { -    virtual Void +    virtual void      traverse (Type& a)      {        if (a.annotated_p ()) @@ -351,7 +343,7 @@ namespace    struct Complex: Traversal::Complex    { -    virtual Void +    virtual void      traverse (Type& c)      {        // Anonymous type definition can recursively refer to itself. @@ -389,7 +381,7 @@ namespace    struct GlobalAttribute: Traversal::Attribute    { -    virtual Void +    virtual void      traverse (Type& a)      {        if (a.annotated_p ()) @@ -423,7 +415,7 @@ namespace    struct GlobalElement: Traversal::Element    { -    virtual Void +    virtual void      traverse (Type& e)      {        if (e.annotated_p ()) @@ -457,7 +449,7 @@ namespace    struct Namespace: Traversal::Namespace    { -    virtual Void +    virtual void      traverse (Type& n)      {        wcout << ind << "namespace " << n.name () << endl @@ -477,21 +469,21 @@ namespace                 Traversal::Sources                 //Traversal::Implies @@ Need a --with-implies option    { -    virtual Void +    virtual void      traverse (SemanticGraph::Imports& i)      {        if (traverse_uses (i, "imports"))          Traversal::Imports::traverse (i);      } -    virtual Void +    virtual void      traverse (SemanticGraph::Includes& i)      {        if (traverse_uses (i, "includes"))          Traversal::Includes::traverse (i);      } -    virtual Void +    virtual void      traverse (SemanticGraph::Sources& s)      {        if (traverse_uses (s, "sources")) @@ -499,7 +491,7 @@ namespace      }      /* -    virtual Void +    virtual void      traverse (SemanticGraph::Implies& i)      {        if (traverse_uses (i, "implies")) @@ -507,7 +499,7 @@ namespace      }      */ -    Boolean +    bool      traverse_uses (SemanticGraph::Uses& u, String const& type)      {        SemanticGraph::Schema& s (u.schema ()); @@ -531,7 +523,7 @@ namespace    struct Schema: Traversal::Schema    { -    virtual Void +    virtual void      traverse (Type& s)      {        wcout << ind << "{" << endl; @@ -545,20 +537,19 @@ namespace  struct AnonymousNameTranslator: Transformations::AnonymousNameTranslator  { -  virtual WideString -  translate (WideString const& /*file*/, -             WideString const& ns, -             WideString const& name, -             WideString const& xpath) +  virtual String +  translate (String const& /*file*/, +             String const& ns, +             String const& name, +             String const& xpath)    {      wcout << "anonymous: " << ns << " " << name << " " << xpath << endl;      return name;    }  }; - -Int -main (Int argc, Char* argv[]) +int +main (int argc, char* argv[])  {    try    { @@ -570,9 +561,9 @@ main (Int argc, Char* argv[])      // Parse options.      // -    Int i (1); -    Boolean anon (false); -    Boolean enum_synth (false); +    int i (1); +    bool anon (false); +    bool enum_synth (false);      for (; i < argc; ++i)      { @@ -586,10 +577,10 @@ main (Int argc, Char* argv[])      // Parse schema.      // -    SemanticGraph::Path path (argv[i], boost::filesystem::native); +    SemanticGraph::Path path (argv[i]);      Parser parser (true, false, true); -    Evptr<SemanticGraph::Schema> tu (parser.parse (path)); +    auto_ptr<SemanticGraph::Schema> tu (parser.parse (path));      //      // diff --git a/libxsd-frontend/tests/dump/makefile b/libxsd-frontend/tests/dump/makefile index c51e72e..707c9cc 100644 --- a/libxsd-frontend/tests/dump/makefile +++ b/libxsd-frontend/tests/dump/makefile @@ -1,6 +1,5 @@  # file      : tests/dump/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make diff --git a/libxsd-frontend/tests/makefile b/libxsd-frontend/tests/makefile index 6b794d6..7ed5300 100644 --- a/libxsd-frontend/tests/makefile +++ b/libxsd-frontend/tests/makefile @@ -1,6 +1,5 @@  # file      : tests/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/annotation/makefile b/libxsd-frontend/tests/schema/annotation/makefile index 97f578b..7705ba8 100644 --- a/libxsd-frontend/tests/schema/annotation/makefile +++ b/libxsd-frontend/tests/schema/annotation/makefile @@ -1,6 +1,5 @@  # file      : tests/schema/annotation/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/anonymous/makefile b/libxsd-frontend/tests/schema/anonymous/makefile index 950e34b..5d2cfe2 100644 --- a/libxsd-frontend/tests/schema/anonymous/makefile +++ b/libxsd-frontend/tests/schema/anonymous/makefile @@ -1,6 +1,5 @@  # file      : tests/schema/annotation/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/attribute-group/makefile b/libxsd-frontend/tests/schema/attribute-group/makefile index e96c0c7..00746a3 100644 --- a/libxsd-frontend/tests/schema/attribute-group/makefile +++ b/libxsd-frontend/tests/schema/attribute-group/makefile @@ -1,6 +1,5 @@  # file      : tests/schema/attribute-group/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/default/makefile b/libxsd-frontend/tests/schema/default/makefile index dbb5fa9..d2ab540 100644 --- a/libxsd-frontend/tests/schema/default/makefile +++ b/libxsd-frontend/tests/schema/default/makefile @@ -1,6 +1,5 @@  # file      : tests/schema/default/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/element-group/makefile b/libxsd-frontend/tests/schema/element-group/makefile index 8a4ad89..3271b94 100644 --- a/libxsd-frontend/tests/schema/element-group/makefile +++ b/libxsd-frontend/tests/schema/element-group/makefile @@ -1,6 +1,5 @@  # file      : tests/schema/element-group/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/enumeration/makefile b/libxsd-frontend/tests/schema/enumeration/makefile index d958178..bd55e0f 100644 --- a/libxsd-frontend/tests/schema/enumeration/makefile +++ b/libxsd-frontend/tests/schema/enumeration/makefile @@ -1,6 +1,5 @@  # file      : tests/schema/enumeration/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/makefile b/libxsd-frontend/tests/schema/makefile index fde5482..3a6d048 100644 --- a/libxsd-frontend/tests/schema/makefile +++ b/libxsd-frontend/tests/schema/makefile @@ -1,6 +1,5 @@  # file      : tests/schema -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make diff --git a/libxsd-frontend/tests/schema/union/makefile b/libxsd-frontend/tests/schema/union/makefile index 7f01070..b0a83e3 100644 --- a/libxsd-frontend/tests/schema/union/makefile +++ b/libxsd-frontend/tests/schema/union/makefile @@ -1,6 +1,5 @@  # file      : tests/schema/union/makefile -# author    : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC  # license   : GNU GPL v2 + exceptions; see accompanying LICENSE file  include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make | 
