From 2e76646998df0ca1b7d160329c0f3ac8cdda2fe0 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 20 Aug 2017 09:22:43 +0000 Subject: Move shunit2 into ./contrib and add catch-1.8.7 --- contrib/catch-1.9.7/catch.hpp | 11618 +++++++++++++++++++ contrib/shunit2-2.0.3/Makefile | 89 + contrib/shunit2-2.0.3/bin/docbookPrep.sh | 97 + contrib/shunit2-2.0.3/bin/extractDocs.pl | 40 + contrib/shunit2-2.0.3/bin/which | 36 + contrib/shunit2-2.0.3/doc/CHANGES-2.0.txt | 68 + contrib/shunit2-2.0.3/doc/LGPL-2.1 | 504 + contrib/shunit2-2.0.3/doc/README.txt | 153 + contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt | 71 + contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt | 73 + contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt | 71 + contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt | 60 + contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt | 51 + contrib/shunit2-2.0.3/doc/TODO.txt | 5 + contrib/shunit2-2.0.3/doc/contributors.txt | 10 + contrib/shunit2-2.0.3/doc/design_doc.txt | 54 + contrib/shunit2-2.0.3/doc/shunit2.html | 218 + contrib/shunit2-2.0.3/doc/style.css | 33 + contrib/shunit2-2.0.3/lib/sh/shlib | 23 + .../docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl | 26 + .../tldp-xsl/21MAR2004/html/tldp-common.xsl | 22 + .../tldp-xsl/21MAR2004/html/tldp-one-page.xsl | 13 + .../shunit2-2.0.3/share/resources/shelldoc.xslt | 71 + contrib/shunit2-2.0.3/src/docbook/functions.xml | 14 + contrib/shunit2-2.0.3/src/docbook/introduction.xml | 50 + contrib/shunit2-2.0.3/src/docbook/quickstart.xml | 86 + contrib/shunit2-2.0.3/src/docbook/shunit2.xml | 85 + contrib/shunit2-2.0.3/src/shell/shunit2 | 799 ++ contrib/shunit2-2.0.3/src/test/run-test-suite | 116 + contrib/shunit2-2.0.3/src/test/test-functions.inc | 84 + contrib/shunit2-2.0.3/src/test/testAsserts | 242 + contrib/shunit2-2.0.3/src/test/testFailures | 89 + contrib/shunit2-2.0.3/src/test/testInternalFx | 23 + contrib/shunit2-2.0.3/src/test/testSuiteFx | 23 + test/data/issue26/mydata.bim | 2000 ---- test/data/issue26/mydata.fam | 120 - test/data/issue26/mydata_kinship.sXX.txt | 120 - test/shunit2-2.0.3/Makefile | 89 - test/shunit2-2.0.3/bin/docbookPrep.sh | 97 - test/shunit2-2.0.3/bin/extractDocs.pl | 40 - test/shunit2-2.0.3/bin/which | 36 - test/shunit2-2.0.3/doc/CHANGES-2.0.txt | 68 - test/shunit2-2.0.3/doc/LGPL-2.1 | 504 - test/shunit2-2.0.3/doc/README.txt | 153 - test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt | 71 - test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt | 73 - test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt | 71 - test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt | 60 - test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt | 51 - test/shunit2-2.0.3/doc/TODO.txt | 5 - test/shunit2-2.0.3/doc/contributors.txt | 10 - test/shunit2-2.0.3/doc/design_doc.txt | 54 - test/shunit2-2.0.3/doc/shunit2.html | 218 - test/shunit2-2.0.3/doc/style.css | 33 - test/shunit2-2.0.3/lib/sh/shlib | 23 - .../docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl | 26 - .../tldp-xsl/21MAR2004/html/tldp-common.xsl | 22 - .../tldp-xsl/21MAR2004/html/tldp-one-page.xsl | 13 - test/shunit2-2.0.3/share/resources/shelldoc.xslt | 71 - test/shunit2-2.0.3/src/docbook/functions.xml | 14 - test/shunit2-2.0.3/src/docbook/introduction.xml | 50 - test/shunit2-2.0.3/src/docbook/quickstart.xml | 86 - test/shunit2-2.0.3/src/docbook/shunit2.xml | 85 - test/shunit2-2.0.3/src/shell/shunit2 | 799 -- test/shunit2-2.0.3/src/test/run-test-suite | 116 - test/shunit2-2.0.3/src/test/test-functions.inc | 84 - test/shunit2-2.0.3/src/test/testAsserts | 242 - test/shunit2-2.0.3/src/test/testFailures | 89 - test/shunit2-2.0.3/src/test/testInternalFx | 23 - test/shunit2-2.0.3/src/test/testSuiteFx | 23 - 70 files changed, 15017 insertions(+), 5639 deletions(-) create mode 100644 contrib/catch-1.9.7/catch.hpp create mode 100644 contrib/shunit2-2.0.3/Makefile create mode 100755 contrib/shunit2-2.0.3/bin/docbookPrep.sh create mode 100755 contrib/shunit2-2.0.3/bin/extractDocs.pl create mode 100755 contrib/shunit2-2.0.3/bin/which create mode 100644 contrib/shunit2-2.0.3/doc/CHANGES-2.0.txt create mode 100644 contrib/shunit2-2.0.3/doc/LGPL-2.1 create mode 100644 contrib/shunit2-2.0.3/doc/README.txt create mode 100644 contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt create mode 100644 contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt create mode 100644 contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt create mode 100644 contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt create mode 100644 contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt create mode 100644 contrib/shunit2-2.0.3/doc/TODO.txt create mode 100644 contrib/shunit2-2.0.3/doc/contributors.txt create mode 100644 contrib/shunit2-2.0.3/doc/design_doc.txt create mode 100644 contrib/shunit2-2.0.3/doc/shunit2.html create mode 100644 contrib/shunit2-2.0.3/doc/style.css create mode 100644 contrib/shunit2-2.0.3/lib/sh/shlib create mode 100644 contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl create mode 100644 contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl create mode 100644 contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl create mode 100644 contrib/shunit2-2.0.3/share/resources/shelldoc.xslt create mode 100644 contrib/shunit2-2.0.3/src/docbook/functions.xml create mode 100644 contrib/shunit2-2.0.3/src/docbook/introduction.xml create mode 100644 contrib/shunit2-2.0.3/src/docbook/quickstart.xml create mode 100644 contrib/shunit2-2.0.3/src/docbook/shunit2.xml create mode 100644 contrib/shunit2-2.0.3/src/shell/shunit2 create mode 100755 contrib/shunit2-2.0.3/src/test/run-test-suite create mode 100644 contrib/shunit2-2.0.3/src/test/test-functions.inc create mode 100755 contrib/shunit2-2.0.3/src/test/testAsserts create mode 100755 contrib/shunit2-2.0.3/src/test/testFailures create mode 100755 contrib/shunit2-2.0.3/src/test/testInternalFx create mode 100755 contrib/shunit2-2.0.3/src/test/testSuiteFx delete mode 100644 test/data/issue26/mydata.bim delete mode 100644 test/data/issue26/mydata.fam delete mode 100644 test/data/issue26/mydata_kinship.sXX.txt delete mode 100644 test/shunit2-2.0.3/Makefile delete mode 100755 test/shunit2-2.0.3/bin/docbookPrep.sh delete mode 100755 test/shunit2-2.0.3/bin/extractDocs.pl delete mode 100755 test/shunit2-2.0.3/bin/which delete mode 100644 test/shunit2-2.0.3/doc/CHANGES-2.0.txt delete mode 100644 test/shunit2-2.0.3/doc/LGPL-2.1 delete mode 100644 test/shunit2-2.0.3/doc/README.txt delete mode 100644 test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt delete mode 100644 test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt delete mode 100644 test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt delete mode 100644 test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt delete mode 100644 test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt delete mode 100644 test/shunit2-2.0.3/doc/TODO.txt delete mode 100644 test/shunit2-2.0.3/doc/contributors.txt delete mode 100644 test/shunit2-2.0.3/doc/design_doc.txt delete mode 100644 test/shunit2-2.0.3/doc/shunit2.html delete mode 100644 test/shunit2-2.0.3/doc/style.css delete mode 100644 test/shunit2-2.0.3/lib/sh/shlib delete mode 100644 test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl delete mode 100644 test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl delete mode 100644 test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl delete mode 100644 test/shunit2-2.0.3/share/resources/shelldoc.xslt delete mode 100644 test/shunit2-2.0.3/src/docbook/functions.xml delete mode 100644 test/shunit2-2.0.3/src/docbook/introduction.xml delete mode 100644 test/shunit2-2.0.3/src/docbook/quickstart.xml delete mode 100644 test/shunit2-2.0.3/src/docbook/shunit2.xml delete mode 100644 test/shunit2-2.0.3/src/shell/shunit2 delete mode 100755 test/shunit2-2.0.3/src/test/run-test-suite delete mode 100644 test/shunit2-2.0.3/src/test/test-functions.inc delete mode 100755 test/shunit2-2.0.3/src/test/testAsserts delete mode 100755 test/shunit2-2.0.3/src/test/testFailures delete mode 100755 test/shunit2-2.0.3/src/test/testInternalFx delete mode 100755 test/shunit2-2.0.3/src/test/testSuiteFx diff --git a/contrib/catch-1.9.7/catch.hpp b/contrib/catch-1.9.7/catch.hpp new file mode 100644 index 0000000..7c351e9 --- /dev/null +++ b/contrib/catch-1.9.7/catch.hpp @@ -0,0 +1,11618 @@ +/* + * Catch v1.9.7 + * Generated: 2017-08-10 23:49:15.233907 + * ---------------------------------------------------------- + * This file has been merged from multiple headers. Please don't edit it directly + * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED + +#define TWOBLUECUBES_CATCH_HPP_INCLUDED + +#ifdef __clang__ +# pragma clang system_header +#elif defined __GNUC__ +# pragma GCC system_header +#endif + +// #included from: internal/catch_suppress_warnings.h + +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# pragma warning(push) +# pragma warning(disable: 161 1682) +# else // __ICC +# pragma clang diagnostic ignored "-Wglobal-constructors" +# pragma clang diagnostic ignored "-Wvariadic-macros" +# pragma clang diagnostic ignored "-Wc99-extensions" +# pragma clang diagnostic ignored "-Wunused-variable" +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wpadded" +# pragma clang diagnostic ignored "-Wc++98-compat" +# pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +# pragma clang diagnostic ignored "-Wswitch-enum" +# pragma clang diagnostic ignored "-Wcovered-switch-default" +# endif +#elif defined __GNUC__ +# pragma GCC diagnostic ignored "-Wvariadic-macros" +# pragma GCC diagnostic ignored "-Wunused-variable" +# pragma GCC diagnostic ignored "-Wparentheses" + +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpadded" +#endif +#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) +# define CATCH_IMPL +#endif + +#ifdef CATCH_IMPL +# ifndef CLARA_CONFIG_MAIN +# define CLARA_CONFIG_MAIN_NOT_DEFINED +# define CLARA_CONFIG_MAIN +# endif +#endif + +// #included from: internal/catch_notimplemented_exception.h +#define TWOBLUECUBES_CATCH_NOTIMPLEMENTED_EXCEPTION_H_INCLUDED + +// #included from: catch_common.h +#define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED + +// #included from: catch_compiler_capabilities.h +#define TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED + +// Detect a number of compiler features - mostly C++11/14 conformance - by compiler +// The following features are defined: +// +// CATCH_CONFIG_CPP11_NULLPTR : is nullptr supported? +// CATCH_CONFIG_CPP11_NOEXCEPT : is noexcept supported? +// CATCH_CONFIG_CPP11_GENERATED_METHODS : The delete and default keywords for compiler generated methods +// CATCH_CONFIG_CPP11_IS_ENUM : std::is_enum is supported? +// CATCH_CONFIG_CPP11_TUPLE : std::tuple is supported +// CATCH_CONFIG_CPP11_LONG_LONG : is long long supported? +// CATCH_CONFIG_CPP11_OVERRIDE : is override supported? +// CATCH_CONFIG_CPP11_UNIQUE_PTR : is unique_ptr supported (otherwise use auto_ptr) +// CATCH_CONFIG_CPP11_SHUFFLE : is std::shuffle supported? +// CATCH_CONFIG_CPP11_TYPE_TRAITS : are type_traits and enable_if supported? + +// CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported? + +// CATCH_CONFIG_VARIADIC_MACROS : are variadic macros supported? +// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? +// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? +// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? +// **************** +// Note to maintainers: if new toggles are added please document them +// in configuration.md, too +// **************** + +// In general each macro has a _NO_ form +// (e.g. CATCH_CONFIG_CPP11_NO_NULLPTR) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + +// All the C++11 features can be disabled with CATCH_CONFIG_NO_CPP11 + +#ifdef __cplusplus + +# if __cplusplus >= 201103L +# define CATCH_CPP11_OR_GREATER +# endif + +# if __cplusplus >= 201402L +# define CATCH_CPP14_OR_GREATER +# endif + +#endif + +#ifdef __clang__ + +# if __has_feature(cxx_nullptr) +# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR +# endif + +# if __has_feature(cxx_noexcept) +# define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT +# endif + +# if defined(CATCH_CPP11_OR_GREATER) +# define CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic pop" ) +# endif + +#endif // __clang__ + +//////////////////////////////////////////////////////////////////////////////// +// We know some environments not to support full POSIX signals +#if defined(__CYGWIN__) || defined(__QNX__) + +# if !defined(CATCH_CONFIG_POSIX_SIGNALS) +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +# endif + +#endif + +#ifdef __OS400__ +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +# define CATCH_CONFIG_COLOUR_NONE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Cygwin +#ifdef __CYGWIN__ + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin +# define _BSD_SOURCE + +#endif // __CYGWIN__ + +//////////////////////////////////////////////////////////////////////////////// +// Borland +#ifdef __BORLANDC__ + +#endif // __BORLANDC__ + +//////////////////////////////////////////////////////////////////////////////// +// EDG +#ifdef __EDG_VERSION__ + +#endif // __EDG_VERSION__ + +//////////////////////////////////////////////////////////////////////////////// +// Digital Mars +#ifdef __DMC__ + +#endif // __DMC__ + +//////////////////////////////////////////////////////////////////////////////// +// GCC +#ifdef __GNUC__ + +# if __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) +# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR +# endif + +// - otherwise more recent versions define __cplusplus >= 201103L +// and will get picked up below + +#endif // __GNUC__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ +#ifdef _MSC_VER + +#define CATCH_INTERNAL_CONFIG_WINDOWS_SEH + +#if (_MSC_VER >= 1600) +# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR +# define CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR +#endif + +#if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015)) +#define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT +#define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +#define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE +#define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS +#endif + +#endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// + +// Use variadic macros if the compiler supports them +#if ( defined _MSC_VER && _MSC_VER > 1400 && !defined __EDGE__) || \ + ( defined __WAVE__ && __WAVE_HAS_VARIADICS ) || \ + ( defined __GNUC__ && __GNUC__ >= 3 ) || \ + ( !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L ) + +#define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS + +#endif + +// Use __COUNTER__ if the compiler supports it +#if ( defined _MSC_VER && _MSC_VER >= 1300 ) || \ + ( defined __GNUC__ && ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3 )) ) || \ + ( defined __clang__ && __clang_major__ >= 3 ) + +#define CATCH_INTERNAL_CONFIG_COUNTER + +#endif + +//////////////////////////////////////////////////////////////////////////////// +// C++ language feature support + +// catch all support for C++11 +#if defined(CATCH_CPP11_OR_GREATER) + +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR) +# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR +# endif + +# ifndef CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT +# define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT +# endif + +# ifndef CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +# define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +# endif + +# ifndef CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM +# define CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM +# endif + +# ifndef CATCH_INTERNAL_CONFIG_CPP11_TUPLE +# define CATCH_INTERNAL_CONFIG_CPP11_TUPLE +# endif + +# ifndef CATCH_INTERNAL_CONFIG_VARIADIC_MACROS +# define CATCH_INTERNAL_CONFIG_VARIADIC_MACROS +# endif + +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG) +# define CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG +# endif + +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE) +# define CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE +# endif +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) +# define CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR +# endif +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) +# define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE +# endif +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) +# define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS +# endif + +#endif // __cplusplus >= 201103L + +// Now set the actual defines based on the above + anything the user has configured +#if defined(CATCH_INTERNAL_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NO_NULLPTR) && !defined(CATCH_CONFIG_CPP11_NULLPTR) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_NULLPTR +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NO_NOEXCEPT) && !defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_NOEXCEPT +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS) && !defined(CATCH_CONFIG_CPP11_NO_GENERATED_METHODS) && !defined(CATCH_CONFIG_CPP11_GENERATED_METHODS) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_GENERATED_METHODS +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_IS_ENUM) && !defined(CATCH_CONFIG_CPP11_NO_IS_ENUM) && !defined(CATCH_CONFIG_CPP11_IS_ENUM) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_IS_ENUM +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_CPP11_NO_TUPLE) && !defined(CATCH_CONFIG_CPP11_TUPLE) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_TUPLE +#endif +#if defined(CATCH_INTERNAL_CONFIG_VARIADIC_MACROS) && !defined(CATCH_CONFIG_NO_VARIADIC_MACROS) && !defined(CATCH_CONFIG_VARIADIC_MACROS) +# define CATCH_CONFIG_VARIADIC_MACROS +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_NO_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_LONG_LONG +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_NO_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_OVERRIDE +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_NO_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_UNIQUE_PTR +#endif +// Use of __COUNTER__ is suppressed if __JETBRAINS_IDE__ is #defined (meaning we're being parsed by a JetBrains IDE for +// analytics) because, at time of writing, __COUNTER__ is not properly handled by it. +// This does not affect compilation +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) && !defined(__JETBRAINS_IDE__) +# define CATCH_CONFIG_COUNTER +#endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_NO_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_SHUFFLE +#endif +# if defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_NO_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_TYPE_TRAITS +# endif +#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) +# define CATCH_CONFIG_WINDOWS_SEH +#endif +// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. +#if !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) +# define CATCH_CONFIG_POSIX_SIGNALS +#endif + +#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS +#endif + +// noexcept support: +#if defined(CATCH_CONFIG_CPP11_NOEXCEPT) && !defined(CATCH_NOEXCEPT) +# define CATCH_NOEXCEPT noexcept +# define CATCH_NOEXCEPT_IS(x) noexcept(x) +#else +# define CATCH_NOEXCEPT throw() +# define CATCH_NOEXCEPT_IS(x) +#endif + +// nullptr support +#ifdef CATCH_CONFIG_CPP11_NULLPTR +# define CATCH_NULL nullptr +#else +# define CATCH_NULL NULL +#endif + +// override support +#ifdef CATCH_CONFIG_CPP11_OVERRIDE +# define CATCH_OVERRIDE override +#else +# define CATCH_OVERRIDE +#endif + +// unique_ptr support +#ifdef CATCH_CONFIG_CPP11_UNIQUE_PTR +# define CATCH_AUTO_PTR( T ) std::unique_ptr +#else +# define CATCH_AUTO_PTR( T ) std::auto_ptr +#endif + +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif + +#define INTERNAL_CATCH_STRINGIFY2( expr ) #expr +#define INTERNAL_CATCH_STRINGIFY( expr ) INTERNAL_CATCH_STRINGIFY2( expr ) + +#include +#include + +namespace Catch { + + struct IConfig; + + struct CaseSensitive { enum Choice { + Yes, + No + }; }; + + class NonCopyable { +#ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + NonCopyable( NonCopyable const& ) = delete; + NonCopyable( NonCopyable && ) = delete; + NonCopyable& operator = ( NonCopyable const& ) = delete; + NonCopyable& operator = ( NonCopyable && ) = delete; +#else + NonCopyable( NonCopyable const& info ); + NonCopyable& operator = ( NonCopyable const& ); +#endif + + protected: + NonCopyable() {} + virtual ~NonCopyable(); + }; + + class SafeBool { + public: + typedef void (SafeBool::*type)() const; + + static type makeSafe( bool value ) { + return value ? &SafeBool::trueValue : 0; + } + private: + void trueValue() const {} + }; + + template + void deleteAll( ContainerT& container ) { + typename ContainerT::const_iterator it = container.begin(); + typename ContainerT::const_iterator itEnd = container.end(); + for(; it != itEnd; ++it ) + delete *it; + } + template + void deleteAllValues( AssociativeContainerT& container ) { + typename AssociativeContainerT::const_iterator it = container.begin(); + typename AssociativeContainerT::const_iterator itEnd = container.end(); + for(; it != itEnd; ++it ) + delete it->second; + } + + bool startsWith( std::string const& s, std::string const& prefix ); + bool startsWith( std::string const& s, char prefix ); + bool endsWith( std::string const& s, std::string const& suffix ); + bool endsWith( std::string const& s, char suffix ); + bool contains( std::string const& s, std::string const& infix ); + void toLowerInPlace( std::string& s ); + std::string toLower( std::string const& s ); + std::string trim( std::string const& str ); + bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ); + + struct pluralise { + pluralise( std::size_t count, std::string const& label ); + + friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ); + + std::size_t m_count; + std::string m_label; + }; + + struct SourceLineInfo { + + SourceLineInfo(); + SourceLineInfo( char const* _file, std::size_t _line ); +# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + SourceLineInfo(SourceLineInfo const& other) = default; + SourceLineInfo( SourceLineInfo && ) = default; + SourceLineInfo& operator = ( SourceLineInfo const& ) = default; + SourceLineInfo& operator = ( SourceLineInfo && ) = default; +# endif + bool empty() const; + bool operator == ( SourceLineInfo const& other ) const; + bool operator < ( SourceLineInfo const& other ) const; + + char const* file; + std::size_t line; + }; + + std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); + + // This is just here to avoid compiler warnings with macro constants and boolean literals + inline bool isTrue( bool value ){ return value; } + inline bool alwaysTrue() { return true; } + inline bool alwaysFalse() { return false; } + + void throwLogicError( std::string const& message, SourceLineInfo const& locationInfo ); + + void seedRng( IConfig const& config ); + unsigned int rngSeed(); + + // Use this in variadic streaming macros to allow + // >> +StreamEndStop + // as well as + // >> stuff +StreamEndStop + struct StreamEndStop { + std::string operator+() { + return std::string(); + } + }; + template + T const& operator + ( T const& value, StreamEndStop ) { + return value; + } +} + +#define CATCH_INTERNAL_LINEINFO ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) +#define CATCH_INTERNAL_ERROR( msg ) ::Catch::throwLogicError( msg, CATCH_INTERNAL_LINEINFO ); + +namespace Catch { + + class NotImplementedException : public std::exception + { + public: + NotImplementedException( SourceLineInfo const& lineInfo ); + + virtual ~NotImplementedException() CATCH_NOEXCEPT {} + + virtual const char* what() const CATCH_NOEXCEPT; + + private: + std::string m_what; + SourceLineInfo m_lineInfo; + }; + +} // end namespace Catch + +/////////////////////////////////////////////////////////////////////////////// +#define CATCH_NOT_IMPLEMENTED throw Catch::NotImplementedException( CATCH_INTERNAL_LINEINFO ) + +// #included from: internal/catch_context.h +#define TWOBLUECUBES_CATCH_CONTEXT_H_INCLUDED + +// #included from: catch_interfaces_generators.h +#define TWOBLUECUBES_CATCH_INTERFACES_GENERATORS_H_INCLUDED + +#include + +namespace Catch { + + struct IGeneratorInfo { + virtual ~IGeneratorInfo(); + virtual bool moveNext() = 0; + virtual std::size_t getCurrentIndex() const = 0; + }; + + struct IGeneratorsForTest { + virtual ~IGeneratorsForTest(); + + virtual IGeneratorInfo& getGeneratorInfo( std::string const& fileInfo, std::size_t size ) = 0; + virtual bool moveNext() = 0; + }; + + IGeneratorsForTest* createGeneratorsForTest(); + +} // end namespace Catch + +// #included from: catch_ptr.hpp +#define TWOBLUECUBES_CATCH_PTR_HPP_INCLUDED + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif + +namespace Catch { + + // An intrusive reference counting smart pointer. + // T must implement addRef() and release() methods + // typically implementing the IShared interface + template + class Ptr { + public: + Ptr() : m_p( CATCH_NULL ){} + Ptr( T* p ) : m_p( p ){ + if( m_p ) + m_p->addRef(); + } + Ptr( Ptr const& other ) : m_p( other.m_p ){ + if( m_p ) + m_p->addRef(); + } + ~Ptr(){ + if( m_p ) + m_p->release(); + } + void reset() { + if( m_p ) + m_p->release(); + m_p = CATCH_NULL; + } + Ptr& operator = ( T* p ){ + Ptr temp( p ); + swap( temp ); + return *this; + } + Ptr& operator = ( Ptr const& other ){ + Ptr temp( other ); + swap( temp ); + return *this; + } + void swap( Ptr& other ) { std::swap( m_p, other.m_p ); } + T* get() const{ return m_p; } + T& operator*() const { return *m_p; } + T* operator->() const { return m_p; } + bool operator !() const { return m_p == CATCH_NULL; } + operator SafeBool::type() const { return SafeBool::makeSafe( m_p != CATCH_NULL ); } + + private: + T* m_p; + }; + + struct IShared : NonCopyable { + virtual ~IShared(); + virtual void addRef() const = 0; + virtual void release() const = 0; + }; + + template + struct SharedImpl : T { + + SharedImpl() : m_rc( 0 ){} + + virtual void addRef() const { + ++m_rc; + } + virtual void release() const { + if( --m_rc == 0 ) + delete this; + } + + mutable unsigned int m_rc; + }; + +} // end namespace Catch + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +namespace Catch { + + class TestCase; + class Stream; + struct IResultCapture; + struct IRunner; + struct IGeneratorsForTest; + struct IConfig; + + struct IContext + { + virtual ~IContext(); + + virtual IResultCapture* getResultCapture() = 0; + virtual IRunner* getRunner() = 0; + virtual size_t getGeneratorIndex( std::string const& fileInfo, size_t totalSize ) = 0; + virtual bool advanceGeneratorsForCurrentTest() = 0; + virtual Ptr getConfig() const = 0; + }; + + struct IMutableContext : IContext + { + virtual ~IMutableContext(); + virtual void setResultCapture( IResultCapture* resultCapture ) = 0; + virtual void setRunner( IRunner* runner ) = 0; + virtual void setConfig( Ptr const& config ) = 0; + }; + + IContext& getCurrentContext(); + IMutableContext& getCurrentMutableContext(); + void cleanUpContext(); + Stream createStream( std::string const& streamName ); + +} + +// #included from: internal/catch_test_registry.hpp +#define TWOBLUECUBES_CATCH_TEST_REGISTRY_HPP_INCLUDED + +// #included from: catch_interfaces_testcase.h +#define TWOBLUECUBES_CATCH_INTERFACES_TESTCASE_H_INCLUDED + +#include + +namespace Catch { + + class TestSpec; + + struct ITestCase : IShared { + virtual void invoke () const = 0; + protected: + virtual ~ITestCase(); + }; + + class TestCase; + struct IConfig; + + struct ITestCaseRegistry { + virtual ~ITestCaseRegistry(); + virtual std::vector const& getAllTests() const = 0; + virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; + }; + + bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); + std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); + std::vector const& getAllTestCasesSorted( IConfig const& config ); + +} + +namespace Catch { + +template +class MethodTestCase : public SharedImpl { + +public: + MethodTestCase( void (C::*method)() ) : m_method( method ) {} + + virtual void invoke() const { + C obj; + (obj.*m_method)(); + } + +private: + virtual ~MethodTestCase() {} + + void (C::*m_method)(); +}; + +typedef void(*TestFunction)(); + +struct NameAndDesc { + NameAndDesc( const char* _name = "", const char* _description= "" ) + : name( _name ), description( _description ) + {} + + const char* name; + const char* description; +}; + +void registerTestCase + ( ITestCase* testCase, + char const* className, + NameAndDesc const& nameAndDesc, + SourceLineInfo const& lineInfo ); + +struct AutoReg { + + AutoReg + ( TestFunction function, + SourceLineInfo const& lineInfo, + NameAndDesc const& nameAndDesc ); + + template + AutoReg + ( void (C::*method)(), + char const* className, + NameAndDesc const& nameAndDesc, + SourceLineInfo const& lineInfo ) { + + registerTestCase + ( new MethodTestCase( method ), + className, + nameAndDesc, + lineInfo ); + } + + ~AutoReg(); + +private: + AutoReg( AutoReg const& ); + void operator= ( AutoReg const& ); +}; + +void registerTestCaseFunction + ( TestFunction function, + SourceLineInfo const& lineInfo, + NameAndDesc const& nameAndDesc ); + +} // end namespace Catch + +#ifdef CATCH_CONFIG_VARIADIC_MACROS + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \ + static void TestName(); \ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &TestName, CATCH_INTERNAL_LINEINFO, Catch::NameAndDesc( __VA_ARGS__ ) ); } /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS \ + static void TestName() + #define INTERNAL_CATCH_TESTCASE( ... ) \ + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ ) + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &QualifiedMethod, "&" #QualifiedMethod, Catch::NameAndDesc( __VA_ARGS__ ), CATCH_INTERNAL_LINEINFO ); } /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + namespace{ \ + struct TestName : ClassName{ \ + void test(); \ + }; \ + Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( &TestName::test, #ClassName, Catch::NameAndDesc( __VA_ARGS__ ), CATCH_INTERNAL_LINEINFO ); /* NOLINT */ \ + } \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS \ + void TestName::test() + #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ + INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ ) + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + Catch::AutoReg( Function, CATCH_INTERNAL_LINEINFO, Catch::NameAndDesc( __VA_ARGS__ ) ); /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS + +#else + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TESTCASE2( TestName, Name, Desc ) \ + static void TestName(); \ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &TestName, CATCH_INTERNAL_LINEINFO, Catch::NameAndDesc( Name, Desc ) ); } /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS \ + static void TestName() + #define INTERNAL_CATCH_TESTCASE( Name, Desc ) \ + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), Name, Desc ) + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, Name, Desc ) \ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( &QualifiedMethod, "&" #QualifiedMethod, Catch::NameAndDesc( Name, Desc ), CATCH_INTERNAL_LINEINFO ); } /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestCaseName, ClassName, TestName, Desc )\ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + namespace{ \ + struct TestCaseName : ClassName{ \ + void test(); \ + }; \ + Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( &TestCaseName::test, #ClassName, Catch::NameAndDesc( TestName, Desc ), CATCH_INTERNAL_LINEINFO ); /* NOLINT */ \ + } \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS \ + void TestCaseName::test() + #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, TestName, Desc )\ + INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, TestName, Desc ) + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, Name, Desc ) \ + CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS \ + Catch::AutoReg( Function, CATCH_INTERNAL_LINEINFO, Catch::NameAndDesc( Name, Desc ) ); /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS + +#endif + +// #included from: internal/catch_capture.hpp +#define TWOBLUECUBES_CATCH_CAPTURE_HPP_INCLUDED + +// #included from: catch_result_builder.h +#define TWOBLUECUBES_CATCH_RESULT_BUILDER_H_INCLUDED + +// #included from: catch_result_type.h +#define TWOBLUECUBES_CATCH_RESULT_TYPE_H_INCLUDED + +namespace Catch { + + // ResultWas::OfType enum + struct ResultWas { enum OfType { + Unknown = -1, + Ok = 0, + Info = 1, + Warning = 2, + + FailureBit = 0x10, + + ExpressionFailed = FailureBit | 1, + ExplicitFailure = FailureBit | 2, + + Exception = 0x100 | FailureBit, + + ThrewException = Exception | 1, + DidntThrowException = Exception | 2, + + FatalErrorCondition = 0x200 | FailureBit + + }; }; + + inline bool isOk( ResultWas::OfType resultType ) { + return ( resultType & ResultWas::FailureBit ) == 0; + } + inline bool isJustInfo( int flags ) { + return flags == ResultWas::Info; + } + + // ResultDisposition::Flags enum + struct ResultDisposition { enum Flags { + Normal = 0x01, + + ContinueOnFailure = 0x02, // Failures fail test, but execution continues + FalseTest = 0x04, // Prefix expression with ! + SuppressFail = 0x08 // Failures are reported but do not fail the test + }; }; + + inline ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) { + return static_cast( static_cast( lhs ) | static_cast( rhs ) ); + } + + inline bool shouldContinueOnFailure( int flags ) { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; } + inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; } + inline bool shouldSuppressFailure( int flags ) { return ( flags & ResultDisposition::SuppressFail ) != 0; } + +} // end namespace Catch + +// #included from: catch_assertionresult.h +#define TWOBLUECUBES_CATCH_ASSERTIONRESULT_H_INCLUDED + +#include + +namespace Catch { + + struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison; + + struct DecomposedExpression + { + virtual ~DecomposedExpression() {} + virtual bool isBinaryExpression() const { + return false; + } + virtual void reconstructExpression( std::string& dest ) const = 0; + + // Only simple binary comparisons can be decomposed. + // If more complex check is required then wrap sub-expressions in parentheses. + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator + ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator - ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator * ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator / ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator % ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( T const& ); + + private: + DecomposedExpression& operator = (DecomposedExpression const&); + }; + + struct AssertionInfo + { + AssertionInfo(); + AssertionInfo( char const * _macroName, + SourceLineInfo const& _lineInfo, + char const * _capturedExpression, + ResultDisposition::Flags _resultDisposition, + char const * _secondArg = ""); + + char const * macroName; + SourceLineInfo lineInfo; + char const * capturedExpression; + ResultDisposition::Flags resultDisposition; + char const * secondArg; + }; + + struct AssertionResultData + { + AssertionResultData() : decomposedExpression( CATCH_NULL ) + , resultType( ResultWas::Unknown ) + , negated( false ) + , parenthesized( false ) {} + + void negate( bool parenthesize ) { + negated = !negated; + parenthesized = parenthesize; + if( resultType == ResultWas::Ok ) + resultType = ResultWas::ExpressionFailed; + else if( resultType == ResultWas::ExpressionFailed ) + resultType = ResultWas::Ok; + } + + std::string const& reconstructExpression() const { + if( decomposedExpression != CATCH_NULL ) { + decomposedExpression->reconstructExpression( reconstructedExpression ); + if( parenthesized ) { + reconstructedExpression.insert( 0, 1, '(' ); + reconstructedExpression.append( 1, ')' ); + } + if( negated ) { + reconstructedExpression.insert( 0, 1, '!' ); + } + decomposedExpression = CATCH_NULL; + } + return reconstructedExpression; + } + + mutable DecomposedExpression const* decomposedExpression; + mutable std::string reconstructedExpression; + std::string message; + ResultWas::OfType resultType; + bool negated; + bool parenthesized; + }; + + class AssertionResult { + public: + AssertionResult(); + AssertionResult( AssertionInfo const& info, AssertionResultData const& data ); + ~AssertionResult(); +# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + AssertionResult( AssertionResult const& ) = default; + AssertionResult( AssertionResult && ) = default; + AssertionResult& operator = ( AssertionResult const& ) = default; + AssertionResult& operator = ( AssertionResult && ) = default; +# endif + + bool isOk() const; + bool succeeded() const; + ResultWas::OfType getResultType() const; + bool hasExpression() const; + bool hasMessage() const; + std::string getExpression() const; + std::string getExpressionInMacro() const; + bool hasExpandedExpression() const; + std::string getExpandedExpression() const; + std::string getMessage() const; + SourceLineInfo getSourceInfo() const; + std::string getTestMacroName() const; + void discardDecomposedExpression() const; + void expandDecomposedExpression() const; + + protected: + AssertionInfo m_info; + AssertionResultData m_resultData; + }; + +} // end namespace Catch + +// #included from: catch_matchers.hpp +#define TWOBLUECUBES_CATCH_MATCHERS_HPP_INCLUDED + +namespace Catch { +namespace Matchers { + namespace Impl { + + template struct MatchAllOf; + template struct MatchAnyOf; + template struct MatchNotOf; + + class MatcherUntypedBase { + public: + std::string toString() const { + if( m_cachedToString.empty() ) + m_cachedToString = describe(); + return m_cachedToString; + } + + protected: + virtual ~MatcherUntypedBase(); + virtual std::string describe() const = 0; + mutable std::string m_cachedToString; + private: + MatcherUntypedBase& operator = ( MatcherUntypedBase const& ); + }; + + template + struct MatcherMethod { + virtual bool match( ObjectT const& arg ) const = 0; + }; + template + struct MatcherMethod { + virtual bool match( PtrT* arg ) const = 0; + }; + + template + struct MatcherBase : MatcherUntypedBase, MatcherMethod { + + MatchAllOf operator && ( MatcherBase const& other ) const; + MatchAnyOf operator || ( MatcherBase const& other ) const; + MatchNotOf operator ! () const; + }; + + template + struct MatchAllOf : MatcherBase { + virtual bool match( ArgT const& arg ) const CATCH_OVERRIDE { + for( std::size_t i = 0; i < m_matchers.size(); ++i ) { + if (!m_matchers[i]->match(arg)) + return false; + } + return true; + } + virtual std::string describe() const CATCH_OVERRIDE { + std::string description; + description.reserve( 4 + m_matchers.size()*32 ); + description += "( "; + for( std::size_t i = 0; i < m_matchers.size(); ++i ) { + if( i != 0 ) + description += " and "; + description += m_matchers[i]->toString(); + } + description += " )"; + return description; + } + + MatchAllOf& operator && ( MatcherBase const& other ) { + m_matchers.push_back( &other ); + return *this; + } + + std::vector const*> m_matchers; + }; + template + struct MatchAnyOf : MatcherBase { + + virtual bool match( ArgT const& arg ) const CATCH_OVERRIDE { + for( std::size_t i = 0; i < m_matchers.size(); ++i ) { + if (m_matchers[i]->match(arg)) + return true; + } + return false; + } + virtual std::string describe() const CATCH_OVERRIDE { + std::string description; + description.reserve( 4 + m_matchers.size()*32 ); + description += "( "; + for( std::size_t i = 0; i < m_matchers.size(); ++i ) { + if( i != 0 ) + description += " or "; + description += m_matchers[i]->toString(); + } + description += " )"; + return description; + } + + MatchAnyOf& operator || ( MatcherBase const& other ) { + m_matchers.push_back( &other ); + return *this; + } + + std::vector const*> m_matchers; + }; + + template + struct MatchNotOf : MatcherBase { + + MatchNotOf( MatcherBase const& underlyingMatcher ) : m_underlyingMatcher( underlyingMatcher ) {} + + virtual bool match( ArgT const& arg ) const CATCH_OVERRIDE { + return !m_underlyingMatcher.match( arg ); + } + + virtual std::string describe() const CATCH_OVERRIDE { + return "not " + m_underlyingMatcher.toString(); + } + MatcherBase const& m_underlyingMatcher; + }; + + template + MatchAllOf MatcherBase::operator && ( MatcherBase const& other ) const { + return MatchAllOf() && *this && other; + } + template + MatchAnyOf MatcherBase::operator || ( MatcherBase const& other ) const { + return MatchAnyOf() || *this || other; + } + template + MatchNotOf MatcherBase::operator ! () const { + return MatchNotOf( *this ); + } + + } // namespace Impl + + // The following functions create the actual matcher objects. + // This allows the types to be inferred + // - deprecated: prefer ||, && and ! + template + Impl::MatchNotOf Not( Impl::MatcherBase const& underlyingMatcher ) { + return Impl::MatchNotOf( underlyingMatcher ); + } + template + Impl::MatchAllOf AllOf( Impl::MatcherBase const& m1, Impl::MatcherBase const& m2 ) { + return Impl::MatchAllOf() && m1 && m2; + } + template + Impl::MatchAllOf AllOf( Impl::MatcherBase const& m1, Impl::MatcherBase const& m2, Impl::MatcherBase const& m3 ) { + return Impl::MatchAllOf() && m1 && m2 && m3; + } + template + Impl::MatchAnyOf AnyOf( Impl::MatcherBase const& m1, Impl::MatcherBase const& m2 ) { + return Impl::MatchAnyOf() || m1 || m2; + } + template + Impl::MatchAnyOf AnyOf( Impl::MatcherBase const& m1, Impl::MatcherBase const& m2, Impl::MatcherBase const& m3 ) { + return Impl::MatchAnyOf() || m1 || m2 || m3; + } + +} // namespace Matchers + +using namespace Matchers; +using Matchers::Impl::MatcherBase; + +} // namespace Catch + +namespace Catch { + + struct TestFailureException{}; + + template class ExpressionLhs; + + struct CopyableStream { + CopyableStream() {} + CopyableStream( CopyableStream const& other ) { + oss << other.oss.str(); + } + CopyableStream& operator=( CopyableStream const& other ) { + oss.str(std::string()); + oss << other.oss.str(); + return *this; + } + std::ostringstream oss; + }; + + class ResultBuilder : public DecomposedExpression { + public: + ResultBuilder( char const* macroName, + SourceLineInfo const& lineInfo, + char const* capturedExpression, + ResultDisposition::Flags resultDisposition, + char const* secondArg = "" ); + ~ResultBuilder(); + + template + ExpressionLhs operator <= ( T const& operand ); + ExpressionLhs operator <= ( bool value ); + + template + ResultBuilder& operator << ( T const& value ) { + stream().oss << value; + return *this; + } + + ResultBuilder& setResultType( ResultWas::OfType result ); + ResultBuilder& setResultType( bool result ); + + void endExpression( DecomposedExpression const& expr ); + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE; + + AssertionResult build() const; + AssertionResult build( DecomposedExpression const& expr ) const; + + void useActiveException( ResultDisposition::Flags resultDisposition = ResultDisposition::Normal ); + void captureResult( ResultWas::OfType resultType ); + void captureExpression(); + void captureExpectedException( std::string const& expectedMessage ); + void captureExpectedException( Matchers::Impl::MatcherBase const& matcher ); + void handleResult( AssertionResult const& result ); + void react(); + bool shouldDebugBreak() const; + bool allowThrows() const; + + template + void captureMatch( ArgT const& arg, MatcherT const& matcher, char const* matcherString ); + + void setExceptionGuard(); + void unsetExceptionGuard(); + + private: + AssertionInfo m_assertionInfo; + AssertionResultData m_data; + + CopyableStream &stream() + { + if(!m_usedStream) + { + m_usedStream = true; + m_stream().oss.str(""); + } + return m_stream(); + } + + static CopyableStream &m_stream() + { + static CopyableStream s; + return s; + } + + bool m_shouldDebugBreak; + bool m_shouldThrow; + bool m_guardException; + bool m_usedStream; + }; + +} // namespace Catch + +// Include after due to circular dependency: +// #included from: catch_expression_lhs.hpp +#define TWOBLUECUBES_CATCH_EXPRESSION_LHS_HPP_INCLUDED + +// #included from: catch_evaluate.hpp +#define TWOBLUECUBES_CATCH_EVALUATE_HPP_INCLUDED + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4389) // '==' : signed/unsigned mismatch +#pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform) +#endif + +#include + +namespace Catch { +namespace Internal { + + enum Operator { + IsEqualTo, + IsNotEqualTo, + IsLessThan, + IsGreaterThan, + IsLessThanOrEqualTo, + IsGreaterThanOrEqualTo + }; + + template struct OperatorTraits { static const char* getName(){ return "*error*"; } }; + template<> struct OperatorTraits { static const char* getName(){ return "=="; } }; + template<> struct OperatorTraits { static const char* getName(){ return "!="; } }; + template<> struct OperatorTraits { static const char* getName(){ return "<"; } }; + template<> struct OperatorTraits { static const char* getName(){ return ">"; } }; + template<> struct OperatorTraits { static const char* getName(){ return "<="; } }; + template<> struct OperatorTraits{ static const char* getName(){ return ">="; } }; + + template + T& opCast(T const& t) { return const_cast(t); } + +// nullptr_t support based on pull request #154 from Konstantin Baumann +#ifdef CATCH_CONFIG_CPP11_NULLPTR + inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; } +#endif // CATCH_CONFIG_CPP11_NULLPTR + + // So the compare overloads can be operator agnostic we convey the operator as a template + // enum, which is used to specialise an Evaluator for doing the comparison. + template + struct Evaluator{}; + + template + struct Evaluator { + static bool evaluate( T1 const& lhs, T2 const& rhs) { + return bool( opCast( lhs ) == opCast( rhs ) ); + } + }; + template + struct Evaluator { + static bool evaluate( T1 const& lhs, T2 const& rhs ) { + return bool( opCast( lhs ) != opCast( rhs ) ); + } + }; + template + struct Evaluator { + static bool evaluate( T1 const& lhs, T2 const& rhs ) { + return bool( opCast( lhs ) < opCast( rhs ) ); + } + }; + template + struct Evaluator { + static bool evaluate( T1 const& lhs, T2 const& rhs ) { + return bool( opCast( lhs ) > opCast( rhs ) ); + } + }; + template + struct Evaluator { + static bool evaluate( T1 const& lhs, T2 const& rhs ) { + return bool( opCast( lhs ) >= opCast( rhs ) ); + } + }; + template + struct Evaluator { + static bool evaluate( T1 const& lhs, T2 const& rhs ) { + return bool( opCast( lhs ) <= opCast( rhs ) ); + } + }; + + template + bool applyEvaluator( T1 const& lhs, T2 const& rhs ) { + return Evaluator::evaluate( lhs, rhs ); + } + + // This level of indirection allows us to specialise for integer types + // to avoid signed/ unsigned warnings + + // "base" overload + template + bool compare( T1 const& lhs, T2 const& rhs ) { + return Evaluator::evaluate( lhs, rhs ); + } + + // unsigned X to int + template bool compare( unsigned int lhs, int rhs ) { + return applyEvaluator( lhs, static_cast( rhs ) ); + } + template bool compare( unsigned long lhs, int rhs ) { + return applyEvaluator( lhs, static_cast( rhs ) ); + } + template bool compare( unsigned char lhs, int rhs ) { + return applyEvaluator( lhs, static_cast( rhs ) ); + } + + // unsigned X to long + template bool compare( unsigned int lhs, long rhs ) { + return applyEvaluator( lhs, static_cast( rhs ) ); + } + template bool compare( unsigned long lhs, long rhs ) { + return applyEvaluator( lhs, static_cast( rhs ) ); + } + template bool compare( unsigned char lhs, long rhs ) { + return applyEvaluator( lhs, static_cast( rhs ) ); + } + + // int to unsigned X + template bool compare( int lhs, unsigned int rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( int lhs, unsigned long rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( int lhs, unsigned char rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + + // long to unsigned X + template bool compare( long lhs, unsigned int rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( long lhs, unsigned long rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( long lhs, unsigned char rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + + // pointer to long (when comparing against NULL) + template bool compare( long lhs, T* rhs ) { + return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); + } + template bool compare( T* lhs, long rhs ) { + return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); + } + + // pointer to int (when comparing against NULL) + template bool compare( int lhs, T* rhs ) { + return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); + } + template bool compare( T* lhs, int rhs ) { + return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); + } + +#ifdef CATCH_CONFIG_CPP11_LONG_LONG + // long long to unsigned X + template bool compare( long long lhs, unsigned int rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( long long lhs, unsigned long rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( long long lhs, unsigned long long rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( long long lhs, unsigned char rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + + // unsigned long long to X + template bool compare( unsigned long long lhs, int rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( unsigned long long lhs, long rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( unsigned long long lhs, long long rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + template bool compare( unsigned long long lhs, char rhs ) { + return applyEvaluator( static_cast( lhs ), rhs ); + } + + // pointer to long long (when comparing against NULL) + template bool compare( long long lhs, T* rhs ) { + return Evaluator::evaluate( reinterpret_cast( lhs ), rhs ); + } + template bool compare( T* lhs, long long rhs ) { + return Evaluator::evaluate( lhs, reinterpret_cast( rhs ) ); + } +#endif // CATCH_CONFIG_CPP11_LONG_LONG + +#ifdef CATCH_CONFIG_CPP11_NULLPTR + // pointer to nullptr_t (when comparing against nullptr) + template bool compare( std::nullptr_t, T* rhs ) { + return Evaluator::evaluate( nullptr, rhs ); + } + template bool compare( T* lhs, std::nullptr_t ) { + return Evaluator::evaluate( lhs, nullptr ); + } +#endif // CATCH_CONFIG_CPP11_NULLPTR + +} // end of namespace Internal +} // end of namespace Catch + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +// #included from: catch_tostring.h +#define TWOBLUECUBES_CATCH_TOSTRING_H_INCLUDED + +#include +#include +#include +#include +#include + +#ifdef __OBJC__ +// #included from: catch_objc_arc.hpp +#define TWOBLUECUBES_CATCH_OBJC_ARC_HPP_INCLUDED + +#import + +#ifdef __has_feature +#define CATCH_ARC_ENABLED __has_feature(objc_arc) +#else +#define CATCH_ARC_ENABLED 0 +#endif + +void arcSafeRelease( NSObject* obj ); +id performOptionalSelector( id obj, SEL sel ); + +#if !CATCH_ARC_ENABLED +inline void arcSafeRelease( NSObject* obj ) { + [obj release]; +} +inline id performOptionalSelector( id obj, SEL sel ) { + if( [obj respondsToSelector: sel] ) + return [obj performSelector: sel]; + return nil; +} +#define CATCH_UNSAFE_UNRETAINED +#define CATCH_ARC_STRONG +#else +inline void arcSafeRelease( NSObject* ){} +inline id performOptionalSelector( id obj, SEL sel ) { +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" +#endif + if( [obj respondsToSelector: sel] ) + return [obj performSelector: sel]; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + return nil; +} +#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained +#define CATCH_ARC_STRONG __strong +#endif + +#endif + +#ifdef CATCH_CONFIG_CPP11_TUPLE +#include +#endif + +#ifdef CATCH_CONFIG_CPP11_IS_ENUM +#include +#endif + +namespace Catch { + +// Why we're here. +template +std::string toString( T const& value ); + +// Built in overloads + +std::string toString( std::string const& value ); +std::string toString( std::wstring const& value ); +std::string toString( const char* const value ); +std::string toString( char* const value ); +std::string toString( const wchar_t* const value ); +std::string toString( wchar_t* const value ); +std::string toString( int value ); +std::string toString( unsigned long value ); +std::string toString( unsigned int value ); +std::string toString( const double value ); +std::string toString( const float value ); +std::string toString( bool value ); +std::string toString( char value ); +std::string toString( signed char value ); +std::string toString( unsigned char value ); + +#ifdef CATCH_CONFIG_CPP11_LONG_LONG +std::string toString( long long value ); +std::string toString( unsigned long long value ); +#endif + +#ifdef CATCH_CONFIG_CPP11_NULLPTR +std::string toString( std::nullptr_t ); +#endif + +#ifdef __OBJC__ + std::string toString( NSString const * const& nsstring ); + std::string toString( NSString * CATCH_ARC_STRONG & nsstring ); + std::string toString( NSObject* const& nsObject ); +#endif + +namespace Detail { + + extern const std::string unprintableString; + + #if !defined(CATCH_CONFIG_CPP11_STREAM_INSERTABLE_CHECK) + struct BorgType { + template BorgType( T const& ); + }; + + struct TrueType { char sizer[1]; }; + struct FalseType { char sizer[2]; }; + + TrueType& testStreamable( std::ostream& ); + FalseType testStreamable( FalseType ); + + FalseType operator<<( std::ostream const&, BorgType const& ); + + template + struct IsStreamInsertable { + static std::ostream &s; + static T const&t; + enum { value = sizeof( testStreamable(s << t) ) == sizeof( TrueType ) }; + }; +#else + template + class IsStreamInsertable { + template + static auto test(int) + -> decltype( std::declval() << std::declval(), std::true_type() ); + + template + static auto test(...) -> std::false_type; + + public: + static const bool value = decltype(test(0))::value; + }; +#endif + +#if defined(CATCH_CONFIG_CPP11_IS_ENUM) + template::value + > + struct EnumStringMaker + { + static std::string convert( T const& ) { return unprintableString; } + }; + + template + struct EnumStringMaker + { + static std::string convert( T const& v ) + { + return ::Catch::toString( + static_cast::type>(v) + ); + } + }; +#endif + template + struct StringMakerBase { +#if defined(CATCH_CONFIG_CPP11_IS_ENUM) + template + static std::string convert( T const& v ) + { + return EnumStringMaker::convert( v ); + } +#else + template + static std::string convert( T const& ) { return unprintableString; } +#endif + }; + + template<> + struct StringMakerBase { + template + static std::string convert( T const& _value ) { + std::ostringstream oss; + oss << _value; + return oss.str(); + } + }; + + std::string rawMemoryToString( const void *object, std::size_t size ); + + template + std::string rawMemoryToString( const T& object ) { + return rawMemoryToString( &object, sizeof(object) ); + } + +} // end namespace Detail + +template +struct StringMaker : + Detail::StringMakerBase::value> {}; + +template +struct StringMaker { + template + static std::string convert( U* p ) { + if( !p ) + return "NULL"; + else + return Detail::rawMemoryToString( p ); + } +}; + +template +struct StringMaker { + static std::string convert( R C::* p ) { + if( !p ) + return "NULL"; + else + return Detail::rawMemoryToString( p ); + } +}; + +namespace Detail { + template + std::string rangeToString( InputIterator first, InputIterator last ); +} + +//template +//struct StringMaker > { +// static std::string convert( std::vector const& v ) { +// return Detail::rangeToString( v.begin(), v.end() ); +// } +//}; + +template +std::string toString( std::vector const& v ) { + return Detail::rangeToString( v.begin(), v.end() ); +} + +#ifdef CATCH_CONFIG_CPP11_TUPLE + +// toString for tuples +namespace TupleDetail { + template< + typename Tuple, + std::size_t N = 0, + bool = (N < std::tuple_size::value) + > + struct ElementPrinter { + static void print( const Tuple& tuple, std::ostream& os ) + { + os << ( N ? ", " : " " ) + << Catch::toString(std::get(tuple)); + ElementPrinter::print(tuple,os); + } + }; + + template< + typename Tuple, + std::size_t N + > + struct ElementPrinter { + static void print( const Tuple&, std::ostream& ) {} + }; + +} + +template +struct StringMaker> { + + static std::string convert( const std::tuple& tuple ) + { + std::ostringstream os; + os << '{'; + TupleDetail::ElementPrinter>::print( tuple, os ); + os << " }"; + return os.str(); + } +}; +#endif // CATCH_CONFIG_CPP11_TUPLE + +namespace Detail { + template + std::string makeString( T const& value ) { + return StringMaker::convert( value ); + } +} // end namespace Detail + +/// \brief converts any type to a string +/// +/// The default template forwards on to ostringstream - except when an +/// ostringstream overload does not exist - in which case it attempts to detect +/// that and writes {?}. +/// Overload (not specialise) this template for custom typs that you don't want +/// to provide an ostream overload for. +template +std::string toString( T const& value ) { + return StringMaker::convert( value ); +} + + namespace Detail { + template + std::string rangeToString( InputIterator first, InputIterator last ) { + std::ostringstream oss; + oss << "{ "; + if( first != last ) { + oss << Catch::toString( *first ); + for( ++first ; first != last ; ++first ) + oss << ", " << Catch::toString( *first ); + } + oss << " }"; + return oss.str(); + } +} + +} // end namespace Catch + +namespace Catch { + +template +class BinaryExpression; + +template +class MatchExpression; + +// Wraps the LHS of an expression and overloads comparison operators +// for also capturing those and RHS (if any) +template +class ExpressionLhs : public DecomposedExpression { +public: + ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ), m_truthy(false) {} + + ExpressionLhs& operator = ( const ExpressionLhs& ); + + template + BinaryExpression + operator == ( RhsT const& rhs ) { + return captureExpression( rhs ); + } + + template + BinaryExpression + operator != ( RhsT const& rhs ) { + return captureExpression( rhs ); + } + + template + BinaryExpression + operator < ( RhsT const& rhs ) { + return captureExpression( rhs ); + } + + template + BinaryExpression + operator > ( RhsT const& rhs ) { + return captureExpression( rhs ); + } + + template + BinaryExpression + operator <= ( RhsT const& rhs ) { + return captureExpression( rhs ); + } + + template + BinaryExpression + operator >= ( RhsT const& rhs ) { + return captureExpression( rhs ); + } + + BinaryExpression operator == ( bool rhs ) { + return captureExpression( rhs ); + } + + BinaryExpression operator != ( bool rhs ) { + return captureExpression( rhs ); + } + + void endExpression() { + m_truthy = m_lhs ? true : false; + m_rb + .setResultType( m_truthy ) + .endExpression( *this ); + } + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + dest = Catch::toString( m_lhs ); + } + +private: + template + BinaryExpression captureExpression( RhsT& rhs ) const { + return BinaryExpression( m_rb, m_lhs, rhs ); + } + + template + BinaryExpression captureExpression( bool rhs ) const { + return BinaryExpression( m_rb, m_lhs, rhs ); + } + +private: + ResultBuilder& m_rb; + T m_lhs; + bool m_truthy; +}; + +template +class BinaryExpression : public DecomposedExpression { +public: + BinaryExpression( ResultBuilder& rb, LhsT lhs, RhsT rhs ) + : m_rb( rb ), m_lhs( lhs ), m_rhs( rhs ) {} + + BinaryExpression& operator = ( BinaryExpression& ); + + void endExpression() const { + m_rb + .setResultType( Internal::compare( m_lhs, m_rhs ) ) + .endExpression( *this ); + } + + virtual bool isBinaryExpression() const CATCH_OVERRIDE { + return true; + } + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + std::string lhs = Catch::toString( m_lhs ); + std::string rhs = Catch::toString( m_rhs ); + char delim = lhs.size() + rhs.size() < 40 && + lhs.find('\n') == std::string::npos && + rhs.find('\n') == std::string::npos ? ' ' : '\n'; + dest.reserve( 7 + lhs.size() + rhs.size() ); + // 2 for spaces around operator + // 2 for operator + // 2 for parentheses (conditionally added later) + // 1 for negation (conditionally added later) + dest = lhs; + dest += delim; + dest += Internal::OperatorTraits::getName(); + dest += delim; + dest += rhs; + } + +private: + ResultBuilder& m_rb; + LhsT m_lhs; + RhsT m_rhs; +}; + +template +class MatchExpression : public DecomposedExpression { +public: + MatchExpression( ArgT arg, MatcherT matcher, char const* matcherString ) + : m_arg( arg ), m_matcher( matcher ), m_matcherString( matcherString ) {} + + virtual bool isBinaryExpression() const CATCH_OVERRIDE { + return true; + } + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + std::string matcherAsString = m_matcher.toString(); + dest = Catch::toString( m_arg ); + dest += ' '; + if( matcherAsString == Detail::unprintableString ) + dest += m_matcherString; + else + dest += matcherAsString; + } + +private: + ArgT m_arg; + MatcherT m_matcher; + char const* m_matcherString; +}; + +} // end namespace Catch + + +namespace Catch { + + template + ExpressionLhs ResultBuilder::operator <= ( T const& operand ) { + return ExpressionLhs( *this, operand ); + } + + inline ExpressionLhs ResultBuilder::operator <= ( bool value ) { + return ExpressionLhs( *this, value ); + } + + template + void ResultBuilder::captureMatch( ArgT const& arg, MatcherT const& matcher, + char const* matcherString ) { + MatchExpression expr( arg, matcher, matcherString ); + setResultType( matcher.match( arg ) ); + endExpression( expr ); + } + +} // namespace Catch + +// #included from: catch_message.h +#define TWOBLUECUBES_CATCH_MESSAGE_H_INCLUDED + +#include + +namespace Catch { + + struct MessageInfo { + MessageInfo( std::string const& _macroName, + SourceLineInfo const& _lineInfo, + ResultWas::OfType _type ); + + std::string macroName; + SourceLineInfo lineInfo; + ResultWas::OfType type; + std::string message; + unsigned int sequence; + + bool operator == ( MessageInfo const& other ) const { + return sequence == other.sequence; + } + bool operator < ( MessageInfo const& other ) const { + return sequence < other.sequence; + } + private: + static unsigned int globalCount; + }; + + struct MessageBuilder { + MessageBuilder( std::string const& macroName, + SourceLineInfo const& lineInfo, + ResultWas::OfType type ) + : m_info( macroName, lineInfo, type ) + {} + + template + MessageBuilder& operator << ( T const& value ) { + m_stream << value; + return *this; + } + + MessageInfo m_info; + std::ostringstream m_stream; + }; + + class ScopedMessage { + public: + ScopedMessage( MessageBuilder const& builder ); + ScopedMessage( ScopedMessage const& other ); + ~ScopedMessage(); + + MessageInfo m_info; + }; + +} // end namespace Catch + +// #included from: catch_interfaces_capture.h +#define TWOBLUECUBES_CATCH_INTERFACES_CAPTURE_H_INCLUDED + +#include + +namespace Catch { + + class TestCase; + class AssertionResult; + struct AssertionInfo; + struct SectionInfo; + struct SectionEndInfo; + struct MessageInfo; + class ScopedMessageBuilder; + struct Counts; + + struct IResultCapture { + + virtual ~IResultCapture(); + + virtual void assertionEnded( AssertionResult const& result ) = 0; + virtual bool sectionStarted( SectionInfo const& sectionInfo, + Counts& assertions ) = 0; + virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; + virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; + virtual void pushScopedMessage( MessageInfo const& message ) = 0; + virtual void popScopedMessage( MessageInfo const& message ) = 0; + + virtual std::string getCurrentTestName() const = 0; + virtual const AssertionResult* getLastResult() const = 0; + + virtual void exceptionEarlyReported() = 0; + + virtual void handleFatalErrorCondition( std::string const& message ) = 0; + + virtual bool lastAssertionPassed() = 0; + virtual void assertionPassed() = 0; + virtual void assertionRun() = 0; + }; + + IResultCapture& getResultCapture(); +} + +// #included from: catch_debugger.h +#define TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED + +// #included from: catch_platform.h +#define TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED + +#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +# define CATCH_PLATFORM_MAC +#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) +# define CATCH_PLATFORM_IPHONE +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX +#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) +# define CATCH_PLATFORM_WINDOWS +# if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) +# define CATCH_DEFINES_NOMINMAX +# endif +# if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) +# define CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# endif +#endif + +#include + +namespace Catch{ + + bool isDebuggerActive(); + void writeToDebugConsole( std::string const& text ); +} + +#ifdef CATCH_PLATFORM_MAC + + // The following code snippet based on: + // http://cocoawithlove.com/2008/03/break-into-debugger.html + #if defined(__ppc64__) || defined(__ppc__) + #define CATCH_TRAP() \ + __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ + : : : "memory","r0","r3","r4" ) /* NOLINT */ + #else + #define CATCH_TRAP() __asm__("int $3\n" : : /* NOLINT */ ) + #endif + +#elif defined(CATCH_PLATFORM_LINUX) + // If we can use inline assembler, do it because this allows us to break + // directly at the location of the failing check instead of breaking inside + // raise() called from it, i.e. one stack frame below. + #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) + #define CATCH_TRAP() asm volatile ("int $3") /* NOLINT */ + #else // Fall back to the generic way. + #include + + #define CATCH_TRAP() raise(SIGTRAP) + #endif +#elif defined(_MSC_VER) + #define CATCH_TRAP() __debugbreak() +#elif defined(__MINGW32__) + extern "C" __declspec(dllimport) void __stdcall DebugBreak(); + #define CATCH_TRAP() DebugBreak() +#endif + +#ifdef CATCH_TRAP + #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } +#else + #define CATCH_BREAK_INTO_DEBUGGER() Catch::alwaysTrue(); +#endif + +// #included from: catch_interfaces_runner.h +#define TWOBLUECUBES_CATCH_INTERFACES_RUNNER_H_INCLUDED + +namespace Catch { + class TestCase; + + struct IRunner { + virtual ~IRunner(); + virtual bool aborting() const = 0; + }; +} + +#if defined(CATCH_CONFIG_FAST_COMPILE) +/////////////////////////////////////////////////////////////////////////////// +// We can speedup compilation significantly by breaking into debugger lower in +// the callstack, because then we don't have to expand CATCH_BREAK_INTO_DEBUGGER +// macro in each assertion +#define INTERNAL_CATCH_REACT( resultBuilder ) \ + resultBuilder.react(); + +/////////////////////////////////////////////////////////////////////////////// +// Another way to speed-up compilation is to omit local try-catch for REQUIRE* +// macros. +// This can potentially cause false negative, if the test code catches +// the exception before it propagates back up to the runner. +#define INTERNAL_CATCH_TEST_NO_TRY( macroName, resultDisposition, expr ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \ + __catchResult.setExceptionGuard(); \ + CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + ( __catchResult <= expr ).endExpression(); \ + CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ + __catchResult.unsetExceptionGuard(); \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::isTrue( false && static_cast( !!(expr) ) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look +// The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. + +#define INTERNAL_CHECK_THAT_NO_TRY( macroName, matcher, resultDisposition, arg ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #arg ", " #matcher, resultDisposition ); \ + __catchResult.setExceptionGuard(); \ + __catchResult.captureMatch( arg, matcher, #matcher ); \ + __catchResult.unsetExceptionGuard(); \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::alwaysFalse() ) + +#else +/////////////////////////////////////////////////////////////////////////////// +// In the event of a failure works out if the debugger needs to be invoked +// and/or an exception thrown and takes appropriate action. +// This needs to be done as a macro so the debugger will stop in the user +// source code rather than in Catch library code +#define INTERNAL_CATCH_REACT( resultBuilder ) \ + if( resultBuilder.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \ + resultBuilder.react(); +#endif + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_TEST( macroName, resultDisposition, expr ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \ + try { \ + CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + ( __catchResult <= expr ).endExpression(); \ + CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ + } \ + catch( ... ) { \ + __catchResult.useActiveException( resultDisposition ); \ + } \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::isTrue( false && static_cast( !!(expr) ) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look + // The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_IF( macroName, resultDisposition, expr ) \ + INTERNAL_CATCH_TEST( macroName, resultDisposition, expr ); \ + if( Catch::getResultCapture().lastAssertionPassed() ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_ELSE( macroName, resultDisposition, expr ) \ + INTERNAL_CATCH_TEST( macroName, resultDisposition, expr ); \ + if( !Catch::getResultCapture().lastAssertionPassed() ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, expr ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \ + try { \ + static_cast(expr); \ + __catchResult.captureResult( Catch::ResultWas::Ok ); \ + } \ + catch( ... ) { \ + __catchResult.useActiveException( resultDisposition ); \ + } \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::alwaysFalse() ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_THROWS( macroName, resultDisposition, matcher, expr ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition, #matcher ); \ + if( __catchResult.allowThrows() ) \ + try { \ + static_cast(expr); \ + __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ + } \ + catch( ... ) { \ + __catchResult.captureExpectedException( matcher ); \ + } \ + else \ + __catchResult.captureResult( Catch::ResultWas::Ok ); \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::alwaysFalse() ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr ", " #exceptionType, resultDisposition ); \ + if( __catchResult.allowThrows() ) \ + try { \ + static_cast(expr); \ + __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ + } \ + catch( exceptionType ) { \ + __catchResult.captureResult( Catch::ResultWas::Ok ); \ + } \ + catch( ... ) { \ + __catchResult.useActiveException( resultDisposition ); \ + } \ + else \ + __catchResult.captureResult( Catch::ResultWas::Ok ); \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::alwaysFalse() ) + +/////////////////////////////////////////////////////////////////////////////// +#ifdef CATCH_CONFIG_VARIADIC_MACROS + #define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \ + __catchResult << __VA_ARGS__ + ::Catch::StreamEndStop(); \ + __catchResult.captureResult( messageType ); \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::alwaysFalse() ) +#else + #define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, log ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \ + __catchResult << log + ::Catch::StreamEndStop(); \ + __catchResult.captureResult( messageType ); \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::alwaysFalse() ) +#endif + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_INFO( macroName, log ) \ + Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage ) = Catch::MessageBuilder( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log; + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \ + do { \ + Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #arg ", " #matcher, resultDisposition ); \ + try { \ + __catchResult.captureMatch( arg, matcher, #matcher ); \ + } catch( ... ) { \ + __catchResult.useActiveException( resultDisposition | Catch::ResultDisposition::ContinueOnFailure ); \ + } \ + INTERNAL_CATCH_REACT( __catchResult ) \ + } while( Catch::alwaysFalse() ) + +// #included from: internal/catch_section.h +#define TWOBLUECUBES_CATCH_SECTION_H_INCLUDED + +// #included from: catch_section_info.h +#define TWOBLUECUBES_CATCH_SECTION_INFO_H_INCLUDED + +// #included from: catch_totals.hpp +#define TWOBLUECUBES_CATCH_TOTALS_HPP_INCLUDED + +#include + +namespace Catch { + + struct Counts { + Counts() : passed( 0 ), failed( 0 ), failedButOk( 0 ) {} + + Counts operator - ( Counts const& other ) const { + Counts diff; + diff.passed = passed - other.passed; + diff.failed = failed - other.failed; + diff.failedButOk = failedButOk - other.failedButOk; + return diff; + } + Counts& operator += ( Counts const& other ) { + passed += other.passed; + failed += other.failed; + failedButOk += other.failedButOk; + return *this; + } + + std::size_t total() const { + return passed + failed + failedButOk; + } + bool allPassed() const { + return failed == 0 && failedButOk == 0; + } + bool allOk() const { + return failed == 0; + } + + std::size_t passed; + std::size_t failed; + std::size_t failedButOk; + }; + + struct Totals { + + Totals operator - ( Totals const& other ) const { + Totals diff; + diff.assertions = assertions - other.assertions; + diff.testCases = testCases - other.testCases; + return diff; + } + + Totals delta( Totals const& prevTotals ) const { + Totals diff = *this - prevTotals; + if( diff.assertions.failed > 0 ) + ++diff.testCases.failed; + else if( diff.assertions.failedButOk > 0 ) + ++diff.testCases.failedButOk; + else + ++diff.testCases.passed; + return diff; + } + + Totals& operator += ( Totals const& other ) { + assertions += other.assertions; + testCases += other.testCases; + return *this; + } + + Counts assertions; + Counts testCases; + }; +} + +#include + +namespace Catch { + + struct SectionInfo { + SectionInfo + ( SourceLineInfo const& _lineInfo, + std::string const& _name, + std::string const& _description = std::string() ); + + std::string name; + std::string description; + SourceLineInfo lineInfo; + }; + + struct SectionEndInfo { + SectionEndInfo( SectionInfo const& _sectionInfo, Counts const& _prevAssertions, double _durationInSeconds ) + : sectionInfo( _sectionInfo ), prevAssertions( _prevAssertions ), durationInSeconds( _durationInSeconds ) + {} + + SectionInfo sectionInfo; + Counts prevAssertions; + double durationInSeconds; + }; + +} // end namespace Catch + +// #included from: catch_timer.h +#define TWOBLUECUBES_CATCH_TIMER_H_INCLUDED + +#ifdef _MSC_VER + +namespace Catch { + typedef unsigned long long UInt64; +} +#else +#include +namespace Catch { + typedef uint64_t UInt64; +} +#endif + +namespace Catch { + class Timer { + public: + Timer() : m_ticks( 0 ) {} + void start(); + unsigned int getElapsedMicroseconds() const; + unsigned int getElapsedMilliseconds() const; + double getElapsedSeconds() const; + + private: + UInt64 m_ticks; + }; + +} // namespace Catch + +#include + +namespace Catch { + + class Section : NonCopyable { + public: + Section( SectionInfo const& info ); + ~Section(); + + // This indicates whether the section should be executed or not + operator bool() const; + + private: + SectionInfo m_info; + + std::string m_name; + Counts m_assertions; + bool m_sectionIncluded; + Timer m_timer; + }; + +} // end namespace Catch + +#ifdef CATCH_CONFIG_VARIADIC_MACROS + #define INTERNAL_CATCH_SECTION( ... ) \ + if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) +#else + #define INTERNAL_CATCH_SECTION( name, desc ) \ + if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, name, desc ) ) +#endif + +// #included from: internal/catch_generators.hpp +#define TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED + +#include +#include +#include + +namespace Catch { + +template +struct IGenerator { + virtual ~IGenerator() {} + virtual T getValue( std::size_t index ) const = 0; + virtual std::size_t size () const = 0; +}; + +template +class BetweenGenerator : public IGenerator { +public: + BetweenGenerator( T from, T to ) : m_from( from ), m_to( to ){} + + virtual T getValue( std::size_t index ) const { + return m_from+static_cast( index ); + } + + virtual std::size_t size() const { + return static_cast( 1+m_to-m_from ); + } + +private: + + T m_from; + T m_to; +}; + +template +class ValuesGenerator : public IGenerator { +public: + ValuesGenerator(){} + + void add( T value ) { + m_values.push_back( value ); + } + + virtual T getValue( std::size_t index ) const { + return m_values[index]; + } + + virtual std::size_t size() const { + return m_values.size(); + } + +private: + std::vector m_values; +}; + +template +class CompositeGenerator { +public: + CompositeGenerator() : m_totalSize( 0 ) {} + + // *** Move semantics, similar to auto_ptr *** + CompositeGenerator( CompositeGenerator& other ) + : m_fileInfo( other.m_fileInfo ), + m_totalSize( 0 ) + { + move( other ); + } + + CompositeGenerator& setFileInfo( const char* fileInfo ) { + m_fileInfo = fileInfo; + return *this; + } + + ~CompositeGenerator() { + deleteAll( m_composed ); + } + + operator T () const { + size_t overallIndex = getCurrentContext().getGeneratorIndex( m_fileInfo, m_totalSize ); + + typename std::vector*>::const_iterator it = m_composed.begin(); + typename std::vector*>::const_iterator itEnd = m_composed.end(); + for( size_t index = 0; it != itEnd; ++it ) + { + const IGenerator* generator = *it; + if( overallIndex >= index && overallIndex < index + generator->size() ) + { + return generator->getValue( overallIndex-index ); + } + index += generator->size(); + } + CATCH_INTERNAL_ERROR( "Indexed past end of generated range" ); + return T(); // Suppress spurious "not all control paths return a value" warning in Visual Studio - if you know how to fix this please do so + } + + void add( const IGenerator* generator ) { + m_totalSize += generator->size(); + m_composed.push_back( generator ); + } + + CompositeGenerator& then( CompositeGenerator& other ) { + move( other ); + return *this; + } + + CompositeGenerator& then( T value ) { + ValuesGenerator* valuesGen = new ValuesGenerator(); + valuesGen->add( value ); + add( valuesGen ); + return *this; + } + +private: + + void move( CompositeGenerator& other ) { + m_composed.insert( m_composed.end(), other.m_composed.begin(), other.m_composed.end() ); + m_totalSize += other.m_totalSize; + other.m_composed.clear(); + } + + std::vector*> m_composed; + std::string m_fileInfo; + size_t m_totalSize; +}; + +namespace Generators +{ + template + CompositeGenerator between( T from, T to ) { + CompositeGenerator generators; + generators.add( new BetweenGenerator( from, to ) ); + return generators; + } + + template + CompositeGenerator values( T val1, T val2 ) { + CompositeGenerator generators; + ValuesGenerator* valuesGen = new ValuesGenerator(); + valuesGen->add( val1 ); + valuesGen->add( val2 ); + generators.add( valuesGen ); + return generators; + } + + template + CompositeGenerator values( T val1, T val2, T val3 ){ + CompositeGenerator generators; + ValuesGenerator* valuesGen = new ValuesGenerator(); + valuesGen->add( val1 ); + valuesGen->add( val2 ); + valuesGen->add( val3 ); + generators.add( valuesGen ); + return generators; + } + + template + CompositeGenerator values( T val1, T val2, T val3, T val4 ) { + CompositeGenerator generators; + ValuesGenerator* valuesGen = new ValuesGenerator(); + valuesGen->add( val1 ); + valuesGen->add( val2 ); + valuesGen->add( val3 ); + valuesGen->add( val4 ); + generators.add( valuesGen ); + return generators; + } + +} // end namespace Generators + +using namespace Generators; + +} // end namespace Catch + +#define INTERNAL_CATCH_LINESTR2( line ) #line +#define INTERNAL_CATCH_LINESTR( line ) INTERNAL_CATCH_LINESTR2( line ) + +#define INTERNAL_CATCH_GENERATE( expr ) expr.setFileInfo( __FILE__ "(" INTERNAL_CATCH_LINESTR( __LINE__ ) ")" ) + +// #included from: internal/catch_interfaces_exception.h +#define TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED + +#include +#include + +// #included from: catch_interfaces_registry_hub.h +#define TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED + +#include + +namespace Catch { + + class TestCase; + struct ITestCaseRegistry; + struct IExceptionTranslatorRegistry; + struct IExceptionTranslator; + struct IReporterRegistry; + struct IReporterFactory; + struct ITagAliasRegistry; + + struct IRegistryHub { + virtual ~IRegistryHub(); + + virtual IReporterRegistry const& getReporterRegistry() const = 0; + virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; + virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; + + virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() = 0; + }; + + struct IMutableRegistryHub { + virtual ~IMutableRegistryHub(); + virtual void registerReporter( std::string const& name, Ptr const& factory ) = 0; + virtual void registerListener( Ptr const& factory ) = 0; + virtual void registerTest( TestCase const& testInfo ) = 0; + virtual void registerTranslator( const IExceptionTranslator* translator ) = 0; + virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; + }; + + IRegistryHub& getRegistryHub(); + IMutableRegistryHub& getMutableRegistryHub(); + void cleanUp(); + std::string translateActiveException(); + +} + +namespace Catch { + + typedef std::string(*exceptionTranslateFunction)(); + + struct IExceptionTranslator; + typedef std::vector ExceptionTranslators; + + struct IExceptionTranslator { + virtual ~IExceptionTranslator(); + virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0; + }; + + struct IExceptionTranslatorRegistry { + virtual ~IExceptionTranslatorRegistry(); + + virtual std::string translateActiveException() const = 0; + }; + + class ExceptionTranslatorRegistrar { + template + class ExceptionTranslator : public IExceptionTranslator { + public: + + ExceptionTranslator( std::string(*translateFunction)( T& ) ) + : m_translateFunction( translateFunction ) + {} + + virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const CATCH_OVERRIDE { + try { + if( it == itEnd ) + throw; + else + return (*it)->translate( it+1, itEnd ); + } + catch( T& ex ) { + return m_translateFunction( ex ); + } + } + + protected: + std::string(*m_translateFunction)( T& ); + }; + + public: + template + ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) { + getMutableRegistryHub().registerTranslator + ( new ExceptionTranslator( translateFunction ) ); + } + }; +} + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \ + static std::string translatorName( signature ); \ + namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); }\ + static std::string translatorName( signature ) + +#define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) + +// #included from: internal/catch_approx.hpp +#define TWOBLUECUBES_CATCH_APPROX_HPP_INCLUDED + +#include +#include + +#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) +#include +#endif + +namespace Catch { +namespace Detail { + + class Approx { + public: + explicit Approx ( double value ) + : m_epsilon( std::numeric_limits::epsilon()*100 ), + m_margin( 0.0 ), + m_scale( 1.0 ), + m_value( value ) + {} + + static Approx custom() { + return Approx( 0 ); + } + +#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) + + template ::value>::type> + Approx operator()( T value ) { + Approx approx( static_cast(value) ); + approx.epsilon( m_epsilon ); + approx.margin( m_margin ); + approx.scale( m_scale ); + return approx; + } + + template ::value>::type> + explicit Approx( T value ): Approx(static_cast(value)) + {} + + template ::value>::type> + friend bool operator == ( const T& lhs, Approx const& rhs ) { + // Thanks to Richard Harris for his help refining this formula + auto lhs_v = double(lhs); + bool relativeOK = std::fabs(lhs_v - rhs.m_value) < rhs.m_epsilon * (rhs.m_scale + (std::max)(std::fabs(lhs_v), std::fabs(rhs.m_value))); + if (relativeOK) { + return true; + } + return std::fabs(lhs_v - rhs.m_value) < rhs.m_margin; + } + + template ::value>::type> + friend bool operator == ( Approx const& lhs, const T& rhs ) { + return operator==( rhs, lhs ); + } + + template ::value>::type> + friend bool operator != ( T lhs, Approx const& rhs ) { + return !operator==( lhs, rhs ); + } + + template ::value>::type> + friend bool operator != ( Approx const& lhs, T rhs ) { + return !operator==( rhs, lhs ); + } + + template ::value>::type> + friend bool operator <= ( T lhs, Approx const& rhs ) { + return double(lhs) < rhs.m_value || lhs == rhs; + } + + template ::value>::type> + friend bool operator <= ( Approx const& lhs, T rhs ) { + return lhs.m_value < double(rhs) || lhs == rhs; + } + + template ::value>::type> + friend bool operator >= ( T lhs, Approx const& rhs ) { + return double(lhs) > rhs.m_value || lhs == rhs; + } + + template ::value>::type> + friend bool operator >= ( Approx const& lhs, T rhs ) { + return lhs.m_value > double(rhs) || lhs == rhs; + } + + template ::value>::type> + Approx& epsilon( T newEpsilon ) { + m_epsilon = double(newEpsilon); + return *this; + } + + template ::value>::type> + Approx& margin( T newMargin ) { + m_margin = double(newMargin); + return *this; + } + + template ::value>::type> + Approx& scale( T newScale ) { + m_scale = double(newScale); + return *this; + } + +#else + + Approx operator()( double value ) { + Approx approx( value ); + approx.epsilon( m_epsilon ); + approx.margin( m_margin ); + approx.scale( m_scale ); + return approx; + } + + friend bool operator == ( double lhs, Approx const& rhs ) { + // Thanks to Richard Harris for his help refining this formula + bool relativeOK = std::fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( std::fabs(lhs), std::fabs(rhs.m_value) ) ); + if (relativeOK) { + return true; + } + return std::fabs(lhs - rhs.m_value) < rhs.m_margin; + } + + friend bool operator == ( Approx const& lhs, double rhs ) { + return operator==( rhs, lhs ); + } + + friend bool operator != ( double lhs, Approx const& rhs ) { + return !operator==( lhs, rhs ); + } + + friend bool operator != ( Approx const& lhs, double rhs ) { + return !operator==( rhs, lhs ); + } + + friend bool operator <= ( double lhs, Approx const& rhs ) { + return lhs < rhs.m_value || lhs == rhs; + } + + friend bool operator <= ( Approx const& lhs, double rhs ) { + return lhs.m_value < rhs || lhs == rhs; + } + + friend bool operator >= ( double lhs, Approx const& rhs ) { + return lhs > rhs.m_value || lhs == rhs; + } + + friend bool operator >= ( Approx const& lhs, double rhs ) { + return lhs.m_value > rhs || lhs == rhs; + } + + Approx& epsilon( double newEpsilon ) { + m_epsilon = newEpsilon; + return *this; + } + + Approx& margin( double newMargin ) { + m_margin = newMargin; + return *this; + } + + Approx& scale( double newScale ) { + m_scale = newScale; + return *this; + } +#endif + + std::string toString() const { + std::ostringstream oss; + oss << "Approx( " << Catch::toString( m_value ) << " )"; + return oss.str(); + } + + private: + double m_epsilon; + double m_margin; + double m_scale; + double m_value; + }; +} + +template<> +inline std::string toString( Detail::Approx const& value ) { + return value.toString(); +} + +} // end namespace Catch + +// #included from: internal/catch_matchers_string.h +#define TWOBLUECUBES_CATCH_MATCHERS_STRING_H_INCLUDED + +namespace Catch { +namespace Matchers { + + namespace StdString { + + struct CasedString + { + CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity ); + std::string adjustString( std::string const& str ) const; + std::string caseSensitivitySuffix() const; + + CaseSensitive::Choice m_caseSensitivity; + std::string m_str; + }; + + struct StringMatcherBase : MatcherBase { + StringMatcherBase( std::string const& operation, CasedString const& comparator ); + virtual std::string describe() const CATCH_OVERRIDE; + + CasedString m_comparator; + std::string m_operation; + }; + + struct EqualsMatcher : StringMatcherBase { + EqualsMatcher( CasedString const& comparator ); + virtual bool match( std::string const& source ) const CATCH_OVERRIDE; + }; + struct ContainsMatcher : StringMatcherBase { + ContainsMatcher( CasedString const& comparator ); + virtual bool match( std::string const& source ) const CATCH_OVERRIDE; + }; + struct StartsWithMatcher : StringMatcherBase { + StartsWithMatcher( CasedString const& comparator ); + virtual bool match( std::string const& source ) const CATCH_OVERRIDE; + }; + struct EndsWithMatcher : StringMatcherBase { + EndsWithMatcher( CasedString const& comparator ); + virtual bool match( std::string const& source ) const CATCH_OVERRIDE; + }; + + } // namespace StdString + + // The following functions create the actual matcher objects. + // This allows the types to be inferred + + StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); + StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); + StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); + StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); + +} // namespace Matchers +} // namespace Catch + +// #included from: internal/catch_matchers_vector.h +#define TWOBLUECUBES_CATCH_MATCHERS_VECTOR_H_INCLUDED + +namespace Catch { +namespace Matchers { + + namespace Vector { + + template + struct ContainsElementMatcher : MatcherBase, T> { + + ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {} + + bool match(std::vector const &v) const CATCH_OVERRIDE { + return std::find(v.begin(), v.end(), m_comparator) != v.end(); + } + + virtual std::string describe() const CATCH_OVERRIDE { + return "Contains: " + Catch::toString( m_comparator ); + } + + T const& m_comparator; + }; + + template + struct ContainsMatcher : MatcherBase, std::vector > { + + ContainsMatcher(std::vector const &comparator) : m_comparator( comparator ) {} + + bool match(std::vector const &v) const CATCH_OVERRIDE { + // !TBD: see note in EqualsMatcher + if (m_comparator.size() > v.size()) + return false; + for (size_t i = 0; i < m_comparator.size(); ++i) + if (std::find(v.begin(), v.end(), m_comparator[i]) == v.end()) + return false; + return true; + } + virtual std::string describe() const CATCH_OVERRIDE { + return "Contains: " + Catch::toString( m_comparator ); + } + + std::vector const& m_comparator; + }; + + template + struct EqualsMatcher : MatcherBase, std::vector > { + + EqualsMatcher(std::vector const &comparator) : m_comparator( comparator ) {} + + bool match(std::vector const &v) const CATCH_OVERRIDE { + // !TBD: This currently works if all elements can be compared using != + // - a more general approach would be via a compare template that defaults + // to using !=. but could be specialised for, e.g. std::vector etc + // - then just call that directly + if (m_comparator.size() != v.size()) + return false; + for (size_t i = 0; i < v.size(); ++i) + if (m_comparator[i] != v[i]) + return false; + return true; + } + virtual std::string describe() const CATCH_OVERRIDE { + return "Equals: " + Catch::toString( m_comparator ); + } + std::vector const& m_comparator; + }; + + } // namespace Vector + + // The following functions create the actual matcher objects. + // This allows the types to be inferred + + template + Vector::ContainsMatcher Contains( std::vector const& comparator ) { + return Vector::ContainsMatcher( comparator ); + } + + template + Vector::ContainsElementMatcher VectorContains( T const& comparator ) { + return Vector::ContainsElementMatcher( comparator ); + } + + template + Vector::EqualsMatcher Equals( std::vector const& comparator ) { + return Vector::EqualsMatcher( comparator ); + } + +} // namespace Matchers +} // namespace Catch + +// #included from: internal/catch_interfaces_tag_alias_registry.h +#define TWOBLUECUBES_CATCH_INTERFACES_TAG_ALIAS_REGISTRY_H_INCLUDED + +// #included from: catch_tag_alias.h +#define TWOBLUECUBES_CATCH_TAG_ALIAS_H_INCLUDED + +#include + +namespace Catch { + + struct TagAlias { + TagAlias( std::string const& _tag, SourceLineInfo _lineInfo ) : tag( _tag ), lineInfo( _lineInfo ) {} + + std::string tag; + SourceLineInfo lineInfo; + }; + + struct RegistrarForTagAliases { + RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); + }; + +} // end namespace Catch + +#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } +// #included from: catch_option.hpp +#define TWOBLUECUBES_CATCH_OPTION_HPP_INCLUDED + +namespace Catch { + + // An optional type + template + class Option { + public: + Option() : nullableValue( CATCH_NULL ) {} + Option( T const& _value ) + : nullableValue( new( storage ) T( _value ) ) + {} + Option( Option const& _other ) + : nullableValue( _other ? new( storage ) T( *_other ) : CATCH_NULL ) + {} + + ~Option() { + reset(); + } + + Option& operator= ( Option const& _other ) { + if( &_other != this ) { + reset(); + if( _other ) + nullableValue = new( storage ) T( *_other ); + } + return *this; + } + Option& operator = ( T const& _value ) { + reset(); + nullableValue = new( storage ) T( _value ); + return *this; + } + + void reset() { + if( nullableValue ) + nullableValue->~T(); + nullableValue = CATCH_NULL; + } + + T& operator*() { return *nullableValue; } + T const& operator*() const { return *nullableValue; } + T* operator->() { return nullableValue; } + const T* operator->() const { return nullableValue; } + + T valueOr( T const& defaultValue ) const { + return nullableValue ? *nullableValue : defaultValue; + } + + bool some() const { return nullableValue != CATCH_NULL; } + bool none() const { return nullableValue == CATCH_NULL; } + + bool operator !() const { return nullableValue == CATCH_NULL; } + operator SafeBool::type() const { + return SafeBool::makeSafe( some() ); + } + + private: + T *nullableValue; + union { + char storage[sizeof(T)]; + + // These are here to force alignment for the storage + long double dummy1; + void (*dummy2)(); + long double dummy3; +#ifdef CATCH_CONFIG_CPP11_LONG_LONG + long long dummy4; +#endif + }; + }; + +} // end namespace Catch + +namespace Catch { + + struct ITagAliasRegistry { + virtual ~ITagAliasRegistry(); + virtual Option find( std::string const& alias ) const = 0; + virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0; + + static ITagAliasRegistry const& get(); + }; + +} // end namespace Catch + +// These files are included here so the single_include script doesn't put them +// in the conditionally compiled sections +// #included from: internal/catch_test_case_info.h +#define TWOBLUECUBES_CATCH_TEST_CASE_INFO_H_INCLUDED + +#include +#include + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif + +namespace Catch { + + struct ITestCase; + + struct TestCaseInfo { + enum SpecialProperties{ + None = 0, + IsHidden = 1 << 1, + ShouldFail = 1 << 2, + MayFail = 1 << 3, + Throws = 1 << 4, + NonPortable = 1 << 5 + }; + + TestCaseInfo( std::string const& _name, + std::string const& _className, + std::string const& _description, + std::set const& _tags, + SourceLineInfo const& _lineInfo ); + + TestCaseInfo( TestCaseInfo const& other ); + + friend void setTags( TestCaseInfo& testCaseInfo, std::set const& tags ); + + bool isHidden() const; + bool throws() const; + bool okToFail() const; + bool expectedToFail() const; + + std::string name; + std::string className; + std::string description; + std::set tags; + std::set lcaseTags; + std::string tagsAsString; + SourceLineInfo lineInfo; + SpecialProperties properties; + }; + + class TestCase : public TestCaseInfo { + public: + + TestCase( ITestCase* testCase, TestCaseInfo const& info ); + TestCase( TestCase const& other ); + + TestCase withName( std::string const& _newName ) const; + + void invoke() const; + + TestCaseInfo const& getTestCaseInfo() const; + + void swap( TestCase& other ); + bool operator == ( TestCase const& other ) const; + bool operator < ( TestCase const& other ) const; + TestCase& operator = ( TestCase const& other ); + + private: + Ptr test; + }; + + TestCase makeTestCase( ITestCase* testCase, + std::string const& className, + std::string const& name, + std::string const& description, + SourceLineInfo const& lineInfo ); +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + + +#ifdef __OBJC__ +// #included from: internal/catch_objc.hpp +#define TWOBLUECUBES_CATCH_OBJC_HPP_INCLUDED + +#import + +#include + +// NB. Any general catch headers included here must be included +// in catch.hpp first to make sure they are included by the single +// header for non obj-usage + +/////////////////////////////////////////////////////////////////////////////// +// This protocol is really only here for (self) documenting purposes, since +// all its methods are optional. +@protocol OcFixture + +@optional + +-(void) setUp; +-(void) tearDown; + +@end + +namespace Catch { + + class OcMethod : public SharedImpl { + + public: + OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {} + + virtual void invoke() const { + id obj = [[m_cls alloc] init]; + + performOptionalSelector( obj, @selector(setUp) ); + performOptionalSelector( obj, m_sel ); + performOptionalSelector( obj, @selector(tearDown) ); + + arcSafeRelease( obj ); + } + private: + virtual ~OcMethod() {} + + Class m_cls; + SEL m_sel; + }; + + namespace Detail{ + + inline std::string getAnnotation( Class cls, + std::string const& annotationName, + std::string const& testCaseName ) { + NSString* selStr = [[NSString alloc] initWithFormat:@"Catch_%s_%s", annotationName.c_str(), testCaseName.c_str()]; + SEL sel = NSSelectorFromString( selStr ); + arcSafeRelease( selStr ); + id value = performOptionalSelector( cls, sel ); + if( value ) + return [(NSString*)value UTF8String]; + return ""; + } + } + + inline size_t registerTestMethods() { + size_t noTestMethods = 0; + int noClasses = objc_getClassList( CATCH_NULL, 0 ); + + Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses); + objc_getClassList( classes, noClasses ); + + for( int c = 0; c < noClasses; c++ ) { + Class cls = classes[c]; + { + u_int count; + Method* methods = class_copyMethodList( cls, &count ); + for( u_int m = 0; m < count ; m++ ) { + SEL selector = method_getName(methods[m]); + std::string methodName = sel_getName(selector); + if( startsWith( methodName, "Catch_TestCase_" ) ) { + std::string testCaseName = methodName.substr( 15 ); + std::string name = Detail::getAnnotation( cls, "Name", testCaseName ); + std::string desc = Detail::getAnnotation( cls, "Description", testCaseName ); + const char* className = class_getName( cls ); + + getMutableRegistryHub().registerTest( makeTestCase( new OcMethod( cls, selector ), className, name.c_str(), desc.c_str(), SourceLineInfo() ) ); + noTestMethods++; + } + } + free(methods); + } + } + return noTestMethods; + } + + namespace Matchers { + namespace Impl { + namespace NSStringMatchers { + + struct StringHolder : MatcherBase{ + StringHolder( NSString* substr ) : m_substr( [substr copy] ){} + StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){} + StringHolder() { + arcSafeRelease( m_substr ); + } + + virtual bool match( NSString* arg ) const CATCH_OVERRIDE { + return false; + } + + NSString* m_substr; + }; + + struct Equals : StringHolder { + Equals( NSString* substr ) : StringHolder( substr ){} + + virtual bool match( NSString* str ) const CATCH_OVERRIDE { + return (str != nil || m_substr == nil ) && + [str isEqualToString:m_substr]; + } + + virtual std::string describe() const CATCH_OVERRIDE { + return "equals string: " + Catch::toString( m_substr ); + } + }; + + struct Contains : StringHolder { + Contains( NSString* substr ) : StringHolder( substr ){} + + virtual bool match( NSString* str ) const { + return (str != nil || m_substr == nil ) && + [str rangeOfString:m_substr].location != NSNotFound; + } + + virtual std::string describe() const CATCH_OVERRIDE { + return "contains string: " + Catch::toString( m_substr ); + } + }; + + struct StartsWith : StringHolder { + StartsWith( NSString* substr ) : StringHolder( substr ){} + + virtual bool match( NSString* str ) const { + return (str != nil || m_substr == nil ) && + [str rangeOfString:m_substr].location == 0; + } + + virtual std::string describe() const CATCH_OVERRIDE { + return "starts with: " + Catch::toString( m_substr ); + } + }; + struct EndsWith : StringHolder { + EndsWith( NSString* substr ) : StringHolder( substr ){} + + virtual bool match( NSString* str ) const { + return (str != nil || m_substr == nil ) && + [str rangeOfString:m_substr].location == [str length] - [m_substr length]; + } + + virtual std::string describe() const CATCH_OVERRIDE { + return "ends with: " + Catch::toString( m_substr ); + } + }; + + } // namespace NSStringMatchers + } // namespace Impl + + inline Impl::NSStringMatchers::Equals + Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); } + + inline Impl::NSStringMatchers::Contains + Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); } + + inline Impl::NSStringMatchers::StartsWith + StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); } + + inline Impl::NSStringMatchers::EndsWith + EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); } + + } // namespace Matchers + + using namespace Matchers; + +} // namespace Catch + +/////////////////////////////////////////////////////////////////////////////// +#define OC_TEST_CASE( name, desc )\ ++(NSString*) INTERNAL_CATCH_UNIQUE_NAME( Catch_Name_test ) \ +{\ +return @ name; \ +}\ ++(NSString*) INTERNAL_CATCH_UNIQUE_NAME( Catch_Description_test ) \ +{ \ +return @ desc; \ +} \ +-(void) INTERNAL_CATCH_UNIQUE_NAME( Catch_TestCase_test ) + +#endif + +#ifdef CATCH_IMPL + +// !TBD: Move the leak detector code into a separate header +#ifdef CATCH_CONFIG_WINDOWS_CRTDBG +#include +class LeakDetector { +public: + LeakDetector() { + int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); + flag |= _CRTDBG_LEAK_CHECK_DF; + flag |= _CRTDBG_ALLOC_MEM_DF; + _CrtSetDbgFlag(flag); + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); + // Change this to leaking allocation's number to break there + _CrtSetBreakAlloc(-1); + } +}; +#else +class LeakDetector {}; +#endif + +LeakDetector leakDetector; + +// #included from: internal/catch_impl.hpp +#define TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED + +// Collect all the implementation files together here +// These are the equivalent of what would usually be cpp files + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wweak-vtables" +#endif + +// #included from: ../catch_session.hpp +#define TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED + +// #included from: internal/catch_commandline.hpp +#define TWOBLUECUBES_CATCH_COMMANDLINE_HPP_INCLUDED + +// #included from: catch_config.hpp +#define TWOBLUECUBES_CATCH_CONFIG_HPP_INCLUDED + +// #included from: catch_test_spec_parser.hpp +#define TWOBLUECUBES_CATCH_TEST_SPEC_PARSER_HPP_INCLUDED + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif + +// #included from: catch_test_spec.hpp +#define TWOBLUECUBES_CATCH_TEST_SPEC_HPP_INCLUDED + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif + +// #included from: catch_wildcard_pattern.hpp +#define TWOBLUECUBES_CATCH_WILDCARD_PATTERN_HPP_INCLUDED + +#include + +namespace Catch +{ + class WildcardPattern { + enum WildcardPosition { + NoWildcard = 0, + WildcardAtStart = 1, + WildcardAtEnd = 2, + WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd + }; + + public: + + WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity ) + : m_caseSensitivity( caseSensitivity ), + m_wildcard( NoWildcard ), + m_pattern( adjustCase( pattern ) ) + { + if( startsWith( m_pattern, '*' ) ) { + m_pattern = m_pattern.substr( 1 ); + m_wildcard = WildcardAtStart; + } + if( endsWith( m_pattern, '*' ) ) { + m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); + m_wildcard = static_cast( m_wildcard | WildcardAtEnd ); + } + } + virtual ~WildcardPattern(); + virtual bool matches( std::string const& str ) const { + switch( m_wildcard ) { + case NoWildcard: + return m_pattern == adjustCase( str ); + case WildcardAtStart: + return endsWith( adjustCase( str ), m_pattern ); + case WildcardAtEnd: + return startsWith( adjustCase( str ), m_pattern ); + case WildcardAtBothEnds: + return contains( adjustCase( str ), m_pattern ); + } + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" +#endif + throw std::logic_error( "Unknown enum" ); +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + } + private: + std::string adjustCase( std::string const& str ) const { + return m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str; + } + CaseSensitive::Choice m_caseSensitivity; + WildcardPosition m_wildcard; + std::string m_pattern; + }; +} + +#include +#include + +namespace Catch { + + class TestSpec { + struct Pattern : SharedImpl<> { + virtual ~Pattern(); + virtual bool matches( TestCaseInfo const& testCase ) const = 0; + }; + class NamePattern : public Pattern { + public: + NamePattern( std::string const& name ) + : m_wildcardPattern( toLower( name ), CaseSensitive::No ) + {} + virtual ~NamePattern(); + virtual bool matches( TestCaseInfo const& testCase ) const { + return m_wildcardPattern.matches( toLower( testCase.name ) ); + } + private: + WildcardPattern m_wildcardPattern; + }; + + class TagPattern : public Pattern { + public: + TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {} + virtual ~TagPattern(); + virtual bool matches( TestCaseInfo const& testCase ) const { + return testCase.lcaseTags.find( m_tag ) != testCase.lcaseTags.end(); + } + private: + std::string m_tag; + }; + + class ExcludedPattern : public Pattern { + public: + ExcludedPattern( Ptr const& underlyingPattern ) : m_underlyingPattern( underlyingPattern ) {} + virtual ~ExcludedPattern(); + virtual bool matches( TestCaseInfo const& testCase ) const { return !m_underlyingPattern->matches( testCase ); } + private: + Ptr m_underlyingPattern; + }; + + struct Filter { + std::vector > m_patterns; + + bool matches( TestCaseInfo const& testCase ) const { + // All patterns in a filter must match for the filter to be a match + for( std::vector >::const_iterator it = m_patterns.begin(), itEnd = m_patterns.end(); it != itEnd; ++it ) { + if( !(*it)->matches( testCase ) ) + return false; + } + return true; + } + }; + + public: + bool hasFilters() const { + return !m_filters.empty(); + } + bool matches( TestCaseInfo const& testCase ) const { + // A TestSpec matches if any filter matches + for( std::vector::const_iterator it = m_filters.begin(), itEnd = m_filters.end(); it != itEnd; ++it ) + if( it->matches( testCase ) ) + return true; + return false; + } + + private: + std::vector m_filters; + + friend class TestSpecParser; + }; +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +namespace Catch { + + class TestSpecParser { + enum Mode{ None, Name, QuotedName, Tag, EscapedName }; + Mode m_mode; + bool m_exclusion; + std::size_t m_start, m_pos; + std::string m_arg; + std::vector m_escapeChars; + TestSpec::Filter m_currentFilter; + TestSpec m_testSpec; + ITagAliasRegistry const* m_tagAliases; + + public: + TestSpecParser( ITagAliasRegistry const& tagAliases ) :m_mode(None), m_exclusion(false), m_start(0), m_pos(0), m_tagAliases( &tagAliases ) {} + + TestSpecParser& parse( std::string const& arg ) { + m_mode = None; + m_exclusion = false; + m_start = std::string::npos; + m_arg = m_tagAliases->expandAliases( arg ); + m_escapeChars.clear(); + for( m_pos = 0; m_pos < m_arg.size(); ++m_pos ) + visitChar( m_arg[m_pos] ); + if( m_mode == Name ) + addPattern(); + return *this; + } + TestSpec testSpec() { + addFilter(); + return m_testSpec; + } + private: + void visitChar( char c ) { + if( m_mode == None ) { + switch( c ) { + case ' ': return; + case '~': m_exclusion = true; return; + case '[': return startNewMode( Tag, ++m_pos ); + case '"': return startNewMode( QuotedName, ++m_pos ); + case '\\': return escape(); + default: startNewMode( Name, m_pos ); break; + } + } + if( m_mode == Name ) { + if( c == ',' ) { + addPattern(); + addFilter(); + } + else if( c == '[' ) { + if( subString() == "exclude:" ) + m_exclusion = true; + else + addPattern(); + startNewMode( Tag, ++m_pos ); + } + else if( c == '\\' ) + escape(); + } + else if( m_mode == EscapedName ) + m_mode = Name; + else if( m_mode == QuotedName && c == '"' ) + addPattern(); + else if( m_mode == Tag && c == ']' ) + addPattern(); + } + void startNewMode( Mode mode, std::size_t start ) { + m_mode = mode; + m_start = start; + } + void escape() { + if( m_mode == None ) + m_start = m_pos; + m_mode = EscapedName; + m_escapeChars.push_back( m_pos ); + } + std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); } + template + void addPattern() { + std::string token = subString(); + for( size_t i = 0; i < m_escapeChars.size(); ++i ) + token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 ); + m_escapeChars.clear(); + if( startsWith( token, "exclude:" ) ) { + m_exclusion = true; + token = token.substr( 8 ); + } + if( !token.empty() ) { + Ptr pattern = new T( token ); + if( m_exclusion ) + pattern = new TestSpec::ExcludedPattern( pattern ); + m_currentFilter.m_patterns.push_back( pattern ); + } + m_exclusion = false; + m_mode = None; + } + void addFilter() { + if( !m_currentFilter.m_patterns.empty() ) { + m_testSpec.m_filters.push_back( m_currentFilter ); + m_currentFilter = TestSpec::Filter(); + } + } + }; + inline TestSpec parseTestSpec( std::string const& arg ) { + return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec(); + } + +} // namespace Catch + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +// #included from: catch_interfaces_config.h +#define TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED + +#include +#include +#include + +namespace Catch { + + struct Verbosity { enum Level { + NoOutput = 0, + Quiet, + Normal + }; }; + + struct WarnAbout { enum What { + Nothing = 0x00, + NoAssertions = 0x01 + }; }; + + struct ShowDurations { enum OrNot { + DefaultForReporter, + Always, + Never + }; }; + struct RunTests { enum InWhatOrder { + InDeclarationOrder, + InLexicographicalOrder, + InRandomOrder + }; }; + struct UseColour { enum YesOrNo { + Auto, + Yes, + No + }; }; + + class TestSpec; + + struct IConfig : IShared { + + virtual ~IConfig(); + + virtual bool allowThrows() const = 0; + virtual std::ostream& stream() const = 0; + virtual std::string name() const = 0; + virtual bool includeSuccessfulResults() const = 0; + virtual bool shouldDebugBreak() const = 0; + virtual bool warnAboutMissingAssertions() const = 0; + virtual int abortAfter() const = 0; + virtual bool showInvisibles() const = 0; + virtual ShowDurations::OrNot showDurations() const = 0; + virtual TestSpec const& testSpec() const = 0; + virtual RunTests::InWhatOrder runOrder() const = 0; + virtual unsigned int rngSeed() const = 0; + virtual UseColour::YesOrNo useColour() const = 0; + virtual std::vector const& getSectionsToRun() const = 0; + + }; +} + +// #included from: catch_stream.h +#define TWOBLUECUBES_CATCH_STREAM_H_INCLUDED + +// #included from: catch_streambuf.h +#define TWOBLUECUBES_CATCH_STREAMBUF_H_INCLUDED + +#include + +namespace Catch { + + class StreamBufBase : public std::streambuf { + public: + virtual ~StreamBufBase() CATCH_NOEXCEPT; + }; +} + +#include +#include +#include +#include + +namespace Catch { + + std::ostream& cout(); + std::ostream& cerr(); + std::ostream& clog(); + + struct IStream { + virtual ~IStream() CATCH_NOEXCEPT; + virtual std::ostream& stream() const = 0; + }; + + class FileStream : public IStream { + mutable std::ofstream m_ofs; + public: + FileStream( std::string const& filename ); + virtual ~FileStream() CATCH_NOEXCEPT; + public: // IStream + virtual std::ostream& stream() const CATCH_OVERRIDE; + }; + + class CoutStream : public IStream { + mutable std::ostream m_os; + public: + CoutStream(); + virtual ~CoutStream() CATCH_NOEXCEPT; + + public: // IStream + virtual std::ostream& stream() const CATCH_OVERRIDE; + }; + + class DebugOutStream : public IStream { + CATCH_AUTO_PTR( StreamBufBase ) m_streamBuf; + mutable std::ostream m_os; + public: + DebugOutStream(); + virtual ~DebugOutStream() CATCH_NOEXCEPT; + + public: // IStream + virtual std::ostream& stream() const CATCH_OVERRIDE; + }; +} + +#include +#include +#include +#include + +#ifndef CATCH_CONFIG_CONSOLE_WIDTH +#define CATCH_CONFIG_CONSOLE_WIDTH 80 +#endif + +namespace Catch { + + struct ConfigData { + + ConfigData() + : listTests( false ), + listTags( false ), + listReporters( false ), + listTestNamesOnly( false ), + listExtraInfo( false ), + showSuccessfulTests( false ), + shouldDebugBreak( false ), + noThrow( false ), + showHelp( false ), + showInvisibles( false ), + filenamesAsTags( false ), + abortAfter( -1 ), + rngSeed( 0 ), + verbosity( Verbosity::Normal ), + warnings( WarnAbout::Nothing ), + showDurations( ShowDurations::DefaultForReporter ), + runOrder( RunTests::InDeclarationOrder ), + useColour( UseColour::Auto ) + {} + + bool listTests; + bool listTags; + bool listReporters; + bool listTestNamesOnly; + bool listExtraInfo; + + bool showSuccessfulTests; + bool shouldDebugBreak; + bool noThrow; + bool showHelp; + bool showInvisibles; + bool filenamesAsTags; + + int abortAfter; + unsigned int rngSeed; + + Verbosity::Level verbosity; + WarnAbout::What warnings; + ShowDurations::OrNot showDurations; + RunTests::InWhatOrder runOrder; + UseColour::YesOrNo useColour; + + std::string outputFilename; + std::string name; + std::string processName; + + std::vector reporterNames; + std::vector testsOrTags; + std::vector sectionsToRun; + }; + + class Config : public SharedImpl { + private: + Config( Config const& other ); + Config& operator = ( Config const& other ); + virtual void dummy(); + public: + + Config() + {} + + Config( ConfigData const& data ) + : m_data( data ), + m_stream( openStream() ) + { + if( !data.testsOrTags.empty() ) { + TestSpecParser parser( ITagAliasRegistry::get() ); + for( std::size_t i = 0; i < data.testsOrTags.size(); ++i ) + parser.parse( data.testsOrTags[i] ); + m_testSpec = parser.testSpec(); + } + } + + virtual ~Config() {} + + std::string const& getFilename() const { + return m_data.outputFilename ; + } + + bool listTests() const { return m_data.listTests; } + bool listTestNamesOnly() const { return m_data.listTestNamesOnly; } + bool listTags() const { return m_data.listTags; } + bool listReporters() const { return m_data.listReporters; } + bool listExtraInfo() const { return m_data.listExtraInfo; } + + std::string getProcessName() const { return m_data.processName; } + + std::vector const& getReporterNames() const { return m_data.reporterNames; } + std::vector const& getSectionsToRun() const CATCH_OVERRIDE { return m_data.sectionsToRun; } + + virtual TestSpec const& testSpec() const CATCH_OVERRIDE { return m_testSpec; } + + bool showHelp() const { return m_data.showHelp; } + + // IConfig interface + virtual bool allowThrows() const CATCH_OVERRIDE { return !m_data.noThrow; } + virtual std::ostream& stream() const CATCH_OVERRIDE { return m_stream->stream(); } + virtual std::string name() const CATCH_OVERRIDE { return m_data.name.empty() ? m_data.processName : m_data.name; } + virtual bool includeSuccessfulResults() const CATCH_OVERRIDE { return m_data.showSuccessfulTests; } + virtual bool warnAboutMissingAssertions() const CATCH_OVERRIDE { return m_data.warnings & WarnAbout::NoAssertions; } + virtual ShowDurations::OrNot showDurations() const CATCH_OVERRIDE { return m_data.showDurations; } + virtual RunTests::InWhatOrder runOrder() const CATCH_OVERRIDE { return m_data.runOrder; } + virtual unsigned int rngSeed() const CATCH_OVERRIDE { return m_data.rngSeed; } + virtual UseColour::YesOrNo useColour() const CATCH_OVERRIDE { return m_data.useColour; } + virtual bool shouldDebugBreak() const CATCH_OVERRIDE { return m_data.shouldDebugBreak; } + virtual int abortAfter() const CATCH_OVERRIDE { return m_data.abortAfter; } + virtual bool showInvisibles() const CATCH_OVERRIDE { return m_data.showInvisibles; } + + private: + + IStream const* openStream() { + if( m_data.outputFilename.empty() ) + return new CoutStream(); + else if( m_data.outputFilename[0] == '%' ) { + if( m_data.outputFilename == "%debug" ) + return new DebugOutStream(); + else + throw std::domain_error( "Unrecognised stream: " + m_data.outputFilename ); + } + else + return new FileStream( m_data.outputFilename ); + } + ConfigData m_data; + + CATCH_AUTO_PTR( IStream const ) m_stream; + TestSpec m_testSpec; + }; + +} // end namespace Catch + +// #included from: catch_clara.h +#define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED + +// Use Catch's value for console width (store Clara's off to the side, if present) +#ifdef CLARA_CONFIG_CONSOLE_WIDTH +#define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CLARA_CONFIG_CONSOLE_WIDTH +#undef CLARA_CONFIG_CONSOLE_WIDTH +#endif +#define CLARA_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH + +// Declare Clara inside the Catch namespace +#define STITCH_CLARA_OPEN_NAMESPACE namespace Catch { +// #included from: ../external/clara.h + +// Version 0.0.2.4 + +// Only use header guard if we are not using an outer namespace +#if !defined(TWOBLUECUBES_CLARA_H_INCLUDED) || defined(STITCH_CLARA_OPEN_NAMESPACE) + +#ifndef STITCH_CLARA_OPEN_NAMESPACE +#define TWOBLUECUBES_CLARA_H_INCLUDED +#define STITCH_CLARA_OPEN_NAMESPACE +#define STITCH_CLARA_CLOSE_NAMESPACE +#else +#define STITCH_CLARA_CLOSE_NAMESPACE } +#endif + +#define STITCH_TBC_TEXT_FORMAT_OPEN_NAMESPACE STITCH_CLARA_OPEN_NAMESPACE + +// ----------- #included from tbc_text_format.h ----------- + +// Only use header guard if we are not using an outer namespace +#if !defined(TBC_TEXT_FORMAT_H_INCLUDED) || defined(STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE) +#ifndef STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE +#define TBC_TEXT_FORMAT_H_INCLUDED +#endif + +#include +#include +#include +#include +#include + +// Use optional outer namespace +#ifdef STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE +namespace STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE { +#endif + +namespace Tbc { + +#ifdef TBC_TEXT_FORMAT_CONSOLE_WIDTH + const unsigned int consoleWidth = TBC_TEXT_FORMAT_CONSOLE_WIDTH; +#else + const unsigned int consoleWidth = 80; +#endif + + struct TextAttributes { + TextAttributes() + : initialIndent( std::string::npos ), + indent( 0 ), + width( consoleWidth-1 ), + tabChar( '\t' ) + {} + + TextAttributes& setInitialIndent( std::size_t _value ) { initialIndent = _value; return *this; } + TextAttributes& setIndent( std::size_t _value ) { indent = _value; return *this; } + TextAttributes& setWidth( std::size_t _value ) { width = _value; return *this; } + TextAttributes& setTabChar( char _value ) { tabChar = _value; return *this; } + + std::size_t initialIndent; // indent of first line, or npos + std::size_t indent; // indent of subsequent lines, or all if initialIndent is npos + std::size_t width; // maximum width of text, including indent. Longer text will wrap + char tabChar; // If this char is seen the indent is changed to current pos + }; + + class Text { + public: + Text( std::string const& _str, TextAttributes const& _attr = TextAttributes() ) + : attr( _attr ) + { + std::string wrappableChars = " [({.,/|\\-"; + std::size_t indent = _attr.initialIndent != std::string::npos + ? _attr.initialIndent + : _attr.indent; + std::string remainder = _str; + + while( !remainder.empty() ) { + if( lines.size() >= 1000 ) { + lines.push_back( "... message truncated due to excessive size" ); + return; + } + std::size_t tabPos = std::string::npos; + std::size_t width = (std::min)( remainder.size(), _attr.width - indent ); + std::size_t pos = remainder.find_first_of( '\n' ); + if( pos <= width ) { + width = pos; + } + pos = remainder.find_last_of( _attr.tabChar, width ); + if( pos != std::string::npos ) { + tabPos = pos; + if( remainder[width] == '\n' ) + width--; + remainder = remainder.substr( 0, tabPos ) + remainder.substr( tabPos+1 ); + } + + if( width == remainder.size() ) { + spliceLine( indent, remainder, width ); + } + else if( remainder[width] == '\n' ) { + spliceLine( indent, remainder, width ); + if( width <= 1 || remainder.size() != 1 ) + remainder = remainder.substr( 1 ); + indent = _attr.indent; + } + else { + pos = remainder.find_last_of( wrappableChars, width ); + if( pos != std::string::npos && pos > 0 ) { + spliceLine( indent, remainder, pos ); + if( remainder[0] == ' ' ) + remainder = remainder.substr( 1 ); + } + else { + spliceLine( indent, remainder, width-1 ); + lines.back() += "-"; + } + if( lines.size() == 1 ) + indent = _attr.indent; + if( tabPos != std::string::npos ) + indent += tabPos; + } + } + } + + void spliceLine( std::size_t _indent, std::string& _remainder, std::size_t _pos ) { + lines.push_back( std::string( _indent, ' ' ) + _remainder.substr( 0, _pos ) ); + _remainder = _remainder.substr( _pos ); + } + + typedef std::vector::const_iterator const_iterator; + + const_iterator begin() const { return lines.begin(); } + const_iterator end() const { return lines.end(); } + std::string const& last() const { return lines.back(); } + std::size_t size() const { return lines.size(); } + std::string const& operator[]( std::size_t _index ) const { return lines[_index]; } + std::string toString() const { + std::ostringstream oss; + oss << *this; + return oss.str(); + } + + friend std::ostream& operator << ( std::ostream& _stream, Text const& _text ) { + for( Text::const_iterator it = _text.begin(), itEnd = _text.end(); + it != itEnd; ++it ) { + if( it != _text.begin() ) + _stream << "\n"; + _stream << *it; + } + return _stream; + } + + private: + std::string str; + TextAttributes attr; + std::vector lines; + }; + +} // end namespace Tbc + +#ifdef STITCH_TBC_TEXT_FORMAT_OUTER_NAMESPACE +} // end outer namespace +#endif + +#endif // TBC_TEXT_FORMAT_H_INCLUDED + +// ----------- end of #include from tbc_text_format.h ----------- +// ........... back in clara.h + +#undef STITCH_TBC_TEXT_FORMAT_OPEN_NAMESPACE + +// ----------- #included from clara_compilers.h ----------- + +#ifndef TWOBLUECUBES_CLARA_COMPILERS_H_INCLUDED +#define TWOBLUECUBES_CLARA_COMPILERS_H_INCLUDED + +// Detect a number of compiler features - mostly C++11/14 conformance - by compiler +// The following features are defined: +// +// CLARA_CONFIG_CPP11_NULLPTR : is nullptr supported? +// CLARA_CONFIG_CPP11_NOEXCEPT : is noexcept supported? +// CLARA_CONFIG_CPP11_GENERATED_METHODS : The delete and default keywords for compiler generated methods +// CLARA_CONFIG_CPP11_OVERRIDE : is override supported? +// CLARA_CONFIG_CPP11_UNIQUE_PTR : is unique_ptr supported (otherwise use auto_ptr) + +// CLARA_CONFIG_CPP11_OR_GREATER : Is C++11 supported? + +// CLARA_CONFIG_VARIADIC_MACROS : are variadic macros supported? + +// In general each macro has a _NO_ form +// (e.g. CLARA_CONFIG_CPP11_NO_NULLPTR) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + +// All the C++11 features can be disabled with CLARA_CONFIG_NO_CPP11 + +#ifdef __clang__ + +#if __has_feature(cxx_nullptr) +#define CLARA_INTERNAL_CONFIG_CPP11_NULLPTR +#endif + +#if __has_feature(cxx_noexcept) +#define CLARA_INTERNAL_CONFIG_CPP11_NOEXCEPT +#endif + +#endif // __clang__ + +//////////////////////////////////////////////////////////////////////////////// +// GCC +#ifdef __GNUC__ + +#if __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) +#define CLARA_INTERNAL_CONFIG_CPP11_NULLPTR +#endif + +// - otherwise more recent versions define __cplusplus >= 201103L +// and will get picked up below + +#endif // __GNUC__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ +#ifdef _MSC_VER + +#if (_MSC_VER >= 1600) +#define CLARA_INTERNAL_CONFIG_CPP11_NULLPTR +#define CLARA_INTERNAL_CONFIG_CPP11_UNIQUE_PTR +#endif + +#if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015)) +#define CLARA_INTERNAL_CONFIG_CPP11_NOEXCEPT +#define CLARA_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +#endif + +#endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// +// C++ language feature support + +// catch all support for C++11 +#if defined(__cplusplus) && __cplusplus >= 201103L + +#define CLARA_CPP11_OR_GREATER + +#if !defined(CLARA_INTERNAL_CONFIG_CPP11_NULLPTR) +#define CLARA_INTERNAL_CONFIG_CPP11_NULLPTR +#endif + +#ifndef CLARA_INTERNAL_CONFIG_CPP11_NOEXCEPT +#define CLARA_INTERNAL_CONFIG_CPP11_NOEXCEPT +#endif + +#ifndef CLARA_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +#define CLARA_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +#endif + +#if !defined(CLARA_INTERNAL_CONFIG_CPP11_OVERRIDE) +#define CLARA_INTERNAL_CONFIG_CPP11_OVERRIDE +#endif +#if !defined(CLARA_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) +#define CLARA_INTERNAL_CONFIG_CPP11_UNIQUE_PTR +#endif + +#endif // __cplusplus >= 201103L + +// Now set the actual defines based on the above + anything the user has configured +#if defined(CLARA_INTERNAL_CONFIG_CPP11_NULLPTR) && !defined(CLARA_CONFIG_CPP11_NO_NULLPTR) && !defined(CLARA_CONFIG_CPP11_NULLPTR) && !defined(CLARA_CONFIG_NO_CPP11) +#define CLARA_CONFIG_CPP11_NULLPTR +#endif +#if defined(CLARA_INTERNAL_CONFIG_CPP11_NOEXCEPT) && !defined(CLARA_CONFIG_CPP11_NO_NOEXCEPT) && !defined(CLARA_CONFIG_CPP11_NOEXCEPT) && !defined(CLARA_CONFIG_NO_CPP11) +#define CLARA_CONFIG_CPP11_NOEXCEPT +#endif +#if defined(CLARA_INTERNAL_CONFIG_CPP11_GENERATED_METHODS) && !defined(CLARA_CONFIG_CPP11_NO_GENERATED_METHODS) && !defined(CLARA_CONFIG_CPP11_GENERATED_METHODS) && !defined(CLARA_CONFIG_NO_CPP11) +#define CLARA_CONFIG_CPP11_GENERATED_METHODS +#endif +#if defined(CLARA_INTERNAL_CONFIG_CPP11_OVERRIDE) && !defined(CLARA_CONFIG_NO_OVERRIDE) && !defined(CLARA_CONFIG_CPP11_OVERRIDE) && !defined(CLARA_CONFIG_NO_CPP11) +#define CLARA_CONFIG_CPP11_OVERRIDE +#endif +#if defined(CLARA_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CLARA_CONFIG_NO_UNIQUE_PTR) && !defined(CLARA_CONFIG_CPP11_UNIQUE_PTR) && !defined(CLARA_CONFIG_NO_CPP11) +#define CLARA_CONFIG_CPP11_UNIQUE_PTR +#endif + +// noexcept support: +#if defined(CLARA_CONFIG_CPP11_NOEXCEPT) && !defined(CLARA_NOEXCEPT) +#define CLARA_NOEXCEPT noexcept +# define CLARA_NOEXCEPT_IS(x) noexcept(x) +#else +#define CLARA_NOEXCEPT throw() +# define CLARA_NOEXCEPT_IS(x) +#endif + +// nullptr support +#ifdef CLARA_CONFIG_CPP11_NULLPTR +#define CLARA_NULL nullptr +#else +#define CLARA_NULL NULL +#endif + +// override support +#ifdef CLARA_CONFIG_CPP11_OVERRIDE +#define CLARA_OVERRIDE override +#else +#define CLARA_OVERRIDE +#endif + +// unique_ptr support +#ifdef CLARA_CONFIG_CPP11_UNIQUE_PTR +# define CLARA_AUTO_PTR( T ) std::unique_ptr +#else +# define CLARA_AUTO_PTR( T ) std::auto_ptr +#endif + +#endif // TWOBLUECUBES_CLARA_COMPILERS_H_INCLUDED + +// ----------- end of #include from clara_compilers.h ----------- +// ........... back in clara.h + +#include +#include +#include + +#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) +#define CLARA_PLATFORM_WINDOWS +#endif + +// Use optional outer namespace +#ifdef STITCH_CLARA_OPEN_NAMESPACE +STITCH_CLARA_OPEN_NAMESPACE +#endif + +namespace Clara { + + struct UnpositionalTag {}; + + extern UnpositionalTag _; + +#ifdef CLARA_CONFIG_MAIN + UnpositionalTag _; +#endif + + namespace Detail { + +#ifdef CLARA_CONSOLE_WIDTH + const unsigned int consoleWidth = CLARA_CONFIG_CONSOLE_WIDTH; +#else + const unsigned int consoleWidth = 80; +#endif + + using namespace Tbc; + + inline bool startsWith( std::string const& str, std::string const& prefix ) { + return str.size() >= prefix.size() && str.substr( 0, prefix.size() ) == prefix; + } + + template struct RemoveConstRef{ typedef T type; }; + template struct RemoveConstRef{ typedef T type; }; + template struct RemoveConstRef{ typedef T type; }; + template struct RemoveConstRef{ typedef T type; }; + + template struct IsBool { static const bool value = false; }; + template<> struct IsBool { static const bool value = true; }; + + template + void convertInto( std::string const& _source, T& _dest ) { + std::stringstream ss; + ss << _source; + ss >> _dest; + if( ss.fail() ) + throw std::runtime_error( "Unable to convert " + _source + " to destination type" ); + } + inline void convertInto( std::string const& _source, std::string& _dest ) { + _dest = _source; + } + char toLowerCh(char c) { + return static_cast( std::tolower( c ) ); + } + inline void convertInto( std::string const& _source, bool& _dest ) { + std::string sourceLC = _source; + std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), toLowerCh ); + if( sourceLC == "y" || sourceLC == "1" || sourceLC == "true" || sourceLC == "yes" || sourceLC == "on" ) + _dest = true; + else if( sourceLC == "n" || sourceLC == "0" || sourceLC == "false" || sourceLC == "no" || sourceLC == "off" ) + _dest = false; + else + throw std::runtime_error( "Expected a boolean value but did not recognise:\n '" + _source + "'" ); + } + + template + struct IArgFunction { + virtual ~IArgFunction() {} +#ifdef CLARA_CONFIG_CPP11_GENERATED_METHODS + IArgFunction() = default; + IArgFunction( IArgFunction const& ) = default; +#endif + virtual void set( ConfigT& config, std::string const& value ) const = 0; + virtual bool takesArg() const = 0; + virtual IArgFunction* clone() const = 0; + }; + + template + class BoundArgFunction { + public: + BoundArgFunction() : functionObj( CLARA_NULL ) {} + BoundArgFunction( IArgFunction* _functionObj ) : functionObj( _functionObj ) {} + BoundArgFunction( BoundArgFunction const& other ) : functionObj( other.functionObj ? other.functionObj->clone() : CLARA_NULL ) {} + BoundArgFunction& operator = ( BoundArgFunction const& other ) { + IArgFunction* newFunctionObj = other.functionObj ? other.functionObj->clone() : CLARA_NULL; + delete functionObj; + functionObj = newFunctionObj; + return *this; + } + ~BoundArgFunction() { delete functionObj; } + + void set( ConfigT& config, std::string const& value ) const { + functionObj->set( config, value ); + } + bool takesArg() const { return functionObj->takesArg(); } + + bool isSet() const { + return functionObj != CLARA_NULL; + } + private: + IArgFunction* functionObj; + }; + + template + struct NullBinder : IArgFunction{ + virtual void set( C&, std::string const& ) const {} + virtual bool takesArg() const { return true; } + virtual IArgFunction* clone() const { return new NullBinder( *this ); } + }; + + template + struct BoundDataMember : IArgFunction{ + BoundDataMember( M C::* _member ) : member( _member ) {} + virtual void set( C& p, std::string const& stringValue ) const { + convertInto( stringValue, p.*member ); + } + virtual bool takesArg() const { return !IsBool::value; } + virtual IArgFunction* clone() const { return new BoundDataMember( *this ); } + M C::* member; + }; + template + struct BoundUnaryMethod : IArgFunction{ + BoundUnaryMethod( void (C::*_member)( M ) ) : member( _member ) {} + virtual void set( C& p, std::string const& stringValue ) const { + typename RemoveConstRef::type value; + convertInto( stringValue, value ); + (p.*member)( value ); + } + virtual bool takesArg() const { return !IsBool::value; } + virtual IArgFunction* clone() const { return new BoundUnaryMethod( *this ); } + void (C::*member)( M ); + }; + template + struct BoundNullaryMethod : IArgFunction{ + BoundNullaryMethod( void (C::*_member)() ) : member( _member ) {} + virtual void set( C& p, std::string const& stringValue ) const { + bool value; + convertInto( stringValue, value ); + if( value ) + (p.*member)(); + } + virtual bool takesArg() const { return false; } + virtual IArgFunction* clone() const { return new BoundNullaryMethod( *this ); } + void (C::*member)(); + }; + + template + struct BoundUnaryFunction : IArgFunction{ + BoundUnaryFunction( void (*_function)( C& ) ) : function( _function ) {} + virtual void set( C& obj, std::string const& stringValue ) const { + bool value; + convertInto( stringValue, value ); + if( value ) + function( obj ); + } + virtual bool takesArg() const { return false; } + virtual IArgFunction* clone() const { return new BoundUnaryFunction( *this ); } + void (*function)( C& ); + }; + + template + struct BoundBinaryFunction : IArgFunction{ + BoundBinaryFunction( void (*_function)( C&, T ) ) : function( _function ) {} + virtual void set( C& obj, std::string const& stringValue ) const { + typename RemoveConstRef::type value; + convertInto( stringValue, value ); + function( obj, value ); + } + virtual bool takesArg() const { return !IsBool::value; } + virtual IArgFunction* clone() const { return new BoundBinaryFunction( *this ); } + void (*function)( C&, T ); + }; + + } // namespace Detail + + inline std::vector argsToVector( int argc, char const* const* const argv ) { + std::vector args( static_cast( argc ) ); + for( std::size_t i = 0; i < static_cast( argc ); ++i ) + args[i] = argv[i]; + + return args; + } + + class Parser { + enum Mode { None, MaybeShortOpt, SlashOpt, ShortOpt, LongOpt, Positional }; + Mode mode; + std::size_t from; + bool inQuotes; + public: + + struct Token { + enum Type { Positional, ShortOpt, LongOpt }; + Token( Type _type, std::string const& _data ) : type( _type ), data( _data ) {} + Type type; + std::string data; + }; + + Parser() : mode( None ), from( 0 ), inQuotes( false ){} + + void parseIntoTokens( std::vector const& args, std::vector& tokens ) { + const std::string doubleDash = "--"; + for( std::size_t i = 1; i < args.size() && args[i] != doubleDash; ++i ) + parseIntoTokens( args[i], tokens); + } + + void parseIntoTokens( std::string const& arg, std::vector& tokens ) { + for( std::size_t i = 0; i < arg.size(); ++i ) { + char c = arg[i]; + if( c == '"' ) + inQuotes = !inQuotes; + mode = handleMode( i, c, arg, tokens ); + } + mode = handleMode( arg.size(), '\0', arg, tokens ); + } + Mode handleMode( std::size_t i, char c, std::string const& arg, std::vector& tokens ) { + switch( mode ) { + case None: return handleNone( i, c ); + case MaybeShortOpt: return handleMaybeShortOpt( i, c ); + case ShortOpt: + case LongOpt: + case SlashOpt: return handleOpt( i, c, arg, tokens ); + case Positional: return handlePositional( i, c, arg, tokens ); + default: throw std::logic_error( "Unknown mode" ); + } + } + + Mode handleNone( std::size_t i, char c ) { + if( inQuotes ) { + from = i; + return Positional; + } + switch( c ) { + case '-': return MaybeShortOpt; +#ifdef CLARA_PLATFORM_WINDOWS + case '/': from = i+1; return SlashOpt; +#endif + default: from = i; return Positional; + } + } + Mode handleMaybeShortOpt( std::size_t i, char c ) { + switch( c ) { + case '-': from = i+1; return LongOpt; + default: from = i; return ShortOpt; + } + } + + Mode handleOpt( std::size_t i, char c, std::string const& arg, std::vector& tokens ) { + if( std::string( ":=\0", 3 ).find( c ) == std::string::npos ) + return mode; + + std::string optName = arg.substr( from, i-from ); + if( mode == ShortOpt ) + for( std::size_t j = 0; j < optName.size(); ++j ) + tokens.push_back( Token( Token::ShortOpt, optName.substr( j, 1 ) ) ); + else if( mode == SlashOpt && optName.size() == 1 ) + tokens.push_back( Token( Token::ShortOpt, optName ) ); + else + tokens.push_back( Token( Token::LongOpt, optName ) ); + return None; + } + Mode handlePositional( std::size_t i, char c, std::string const& arg, std::vector& tokens ) { + if( inQuotes || std::string( "\0", 1 ).find( c ) == std::string::npos ) + return mode; + + std::string data = arg.substr( from, i-from ); + tokens.push_back( Token( Token::Positional, data ) ); + return None; + } + }; + + template + struct CommonArgProperties { + CommonArgProperties() {} + CommonArgProperties( Detail::BoundArgFunction const& _boundField ) : boundField( _boundField ) {} + + Detail::BoundArgFunction boundField; + std::string description; + std::string detail; + std::string placeholder; // Only value if boundField takes an arg + + bool takesArg() const { + return !placeholder.empty(); + } + void validate() const { + if( !boundField.isSet() ) + throw std::logic_error( "option not bound" ); + } + }; + struct OptionArgProperties { + std::vector shortNames; + std::string longName; + + bool hasShortName( std::string const& shortName ) const { + return std::find( shortNames.begin(), shortNames.end(), shortName ) != shortNames.end(); + } + bool hasLongName( std::string const& _longName ) const { + return _longName == longName; + } + }; + struct PositionalArgProperties { + PositionalArgProperties() : position( -1 ) {} + int position; // -1 means non-positional (floating) + + bool isFixedPositional() const { + return position != -1; + } + }; + + template + class CommandLine { + + struct Arg : CommonArgProperties, OptionArgProperties, PositionalArgProperties { + Arg() {} + Arg( Detail::BoundArgFunction const& _boundField ) : CommonArgProperties( _boundField ) {} + + using CommonArgProperties::placeholder; // !TBD + + std::string dbgName() const { + if( !longName.empty() ) + return "--" + longName; + if( !shortNames.empty() ) + return "-" + shortNames[0]; + return "positional args"; + } + std::string commands() const { + std::ostringstream oss; + bool first = true; + std::vector::const_iterator it = shortNames.begin(), itEnd = shortNames.end(); + for(; it != itEnd; ++it ) { + if( first ) + first = false; + else + oss << ", "; + oss << "-" << *it; + } + if( !longName.empty() ) { + if( !first ) + oss << ", "; + oss << "--" << longName; + } + if( !placeholder.empty() ) + oss << " <" << placeholder << ">"; + return oss.str(); + } + }; + + typedef CLARA_AUTO_PTR( Arg ) ArgAutoPtr; + + friend void addOptName( Arg& arg, std::string const& optName ) + { + if( optName.empty() ) + return; + if( Detail::startsWith( optName, "--" ) ) { + if( !arg.longName.empty() ) + throw std::logic_error( "Only one long opt may be specified. '" + + arg.longName + + "' already specified, now attempting to add '" + + optName + "'" ); + arg.longName = optName.substr( 2 ); + } + else if( Detail::startsWith( optName, "-" ) ) + arg.shortNames.push_back( optName.substr( 1 ) ); + else + throw std::logic_error( "option must begin with - or --. Option was: '" + optName + "'" ); + } + friend void setPositionalArg( Arg& arg, int position ) + { + arg.position = position; + } + + class ArgBuilder { + public: + ArgBuilder( Arg* arg ) : m_arg( arg ) {} + + // Bind a non-boolean data member (requires placeholder string) + template + void bind( M C::* field, std::string const& placeholder ) { + m_arg->boundField = new Detail::BoundDataMember( field ); + m_arg->placeholder = placeholder; + } + // Bind a boolean data member (no placeholder required) + template + void bind( bool C::* field ) { + m_arg->boundField = new Detail::BoundDataMember( field ); + } + + // Bind a method taking a single, non-boolean argument (requires a placeholder string) + template + void bind( void (C::* unaryMethod)( M ), std::string const& placeholder ) { + m_arg->boundField = new Detail::BoundUnaryMethod( unaryMethod ); + m_arg->placeholder = placeholder; + } + + // Bind a method taking a single, boolean argument (no placeholder string required) + template + void bind( void (C::* unaryMethod)( bool ) ) { + m_arg->boundField = new Detail::BoundUnaryMethod( unaryMethod ); + } + + // Bind a method that takes no arguments (will be called if opt is present) + template + void bind( void (C::* nullaryMethod)() ) { + m_arg->boundField = new Detail::BoundNullaryMethod( nullaryMethod ); + } + + // Bind a free function taking a single argument - the object to operate on (no placeholder string required) + template + void bind( void (* unaryFunction)( C& ) ) { + m_arg->boundField = new Detail::BoundUnaryFunction( unaryFunction ); + } + + // Bind a free function taking a single argument - the object to operate on (requires a placeholder string) + template + void bind( void (* binaryFunction)( C&, T ), std::string const& placeholder ) { + m_arg->boundField = new Detail::BoundBinaryFunction( binaryFunction ); + m_arg->placeholder = placeholder; + } + + ArgBuilder& describe( std::string const& description ) { + m_arg->description = description; + return *this; + } + ArgBuilder& detail( std::string const& detail ) { + m_arg->detail = detail; + return *this; + } + + protected: + Arg* m_arg; + }; + + class OptBuilder : public ArgBuilder { + public: + OptBuilder( Arg* arg ) : ArgBuilder( arg ) {} + OptBuilder( OptBuilder& other ) : ArgBuilder( other ) {} + + OptBuilder& operator[]( std::string const& optName ) { + addOptName( *ArgBuilder::m_arg, optName ); + return *this; + } + }; + + public: + + CommandLine() + : m_boundProcessName( new Detail::NullBinder() ), + m_highestSpecifiedArgPosition( 0 ), + m_throwOnUnrecognisedTokens( false ) + {} + CommandLine( CommandLine const& other ) + : m_boundProcessName( other.m_boundProcessName ), + m_options ( other.m_options ), + m_positionalArgs( other.m_positionalArgs ), + m_highestSpecifiedArgPosition( other.m_highestSpecifiedArgPosition ), + m_throwOnUnrecognisedTokens( other.m_throwOnUnrecognisedTokens ) + { + if( other.m_floatingArg.get() ) + m_floatingArg.reset( new Arg( *other.m_floatingArg ) ); + } + + CommandLine& setThrowOnUnrecognisedTokens( bool shouldThrow = true ) { + m_throwOnUnrecognisedTokens = shouldThrow; + return *this; + } + + OptBuilder operator[]( std::string const& optName ) { + m_options.push_back( Arg() ); + addOptName( m_options.back(), optName ); + OptBuilder builder( &m_options.back() ); + return builder; + } + + ArgBuilder operator[]( int position ) { + m_positionalArgs.insert( std::make_pair( position, Arg() ) ); + if( position > m_highestSpecifiedArgPosition ) + m_highestSpecifiedArgPosition = position; + setPositionalArg( m_positionalArgs[position], position ); + ArgBuilder builder( &m_positionalArgs[position] ); + return builder; + } + + // Invoke this with the _ instance + ArgBuilder operator[]( UnpositionalTag ) { + if( m_floatingArg.get() ) + throw std::logic_error( "Only one unpositional argument can be added" ); + m_floatingArg.reset( new Arg() ); + ArgBuilder builder( m_floatingArg.get() ); + return builder; + } + + template + void bindProcessName( M C::* field ) { + m_boundProcessName = new Detail::BoundDataMember( field ); + } + template + void bindProcessName( void (C::*_unaryMethod)( M ) ) { + m_boundProcessName = new Detail::BoundUnaryMethod( _unaryMethod ); + } + + void optUsage( std::ostream& os, std::size_t indent = 0, std::size_t width = Detail::consoleWidth ) const { + typename std::vector::const_iterator itBegin = m_options.begin(), itEnd = m_options.end(), it; + std::size_t maxWidth = 0; + for( it = itBegin; it != itEnd; ++it ) + maxWidth = (std::max)( maxWidth, it->commands().size() ); + + for( it = itBegin; it != itEnd; ++it ) { + Detail::Text usage( it->commands(), Detail::TextAttributes() + .setWidth( maxWidth+indent ) + .setIndent( indent ) ); + Detail::Text desc( it->description, Detail::TextAttributes() + .setWidth( width - maxWidth - 3 ) ); + + for( std::size_t i = 0; i < (std::max)( usage.size(), desc.size() ); ++i ) { + std::string usageCol = i < usage.size() ? usage[i] : ""; + os << usageCol; + + if( i < desc.size() && !desc[i].empty() ) + os << std::string( indent + 2 + maxWidth - usageCol.size(), ' ' ) + << desc[i]; + os << "\n"; + } + } + } + std::string optUsage() const { + std::ostringstream oss; + optUsage( oss ); + return oss.str(); + } + + void argSynopsis( std::ostream& os ) const { + for( int i = 1; i <= m_highestSpecifiedArgPosition; ++i ) { + if( i > 1 ) + os << " "; + typename std::map::const_iterator it = m_positionalArgs.find( i ); + if( it != m_positionalArgs.end() ) + os << "<" << it->second.placeholder << ">"; + else if( m_floatingArg.get() ) + os << "<" << m_floatingArg->placeholder << ">"; + else + throw std::logic_error( "non consecutive positional arguments with no floating args" ); + } + // !TBD No indication of mandatory args + if( m_floatingArg.get() ) { + if( m_highestSpecifiedArgPosition > 1 ) + os << " "; + os << "[<" << m_floatingArg->placeholder << "> ...]"; + } + } + std::string argSynopsis() const { + std::ostringstream oss; + argSynopsis( oss ); + return oss.str(); + } + + void usage( std::ostream& os, std::string const& procName ) const { + validate(); + os << "usage:\n " << procName << " "; + argSynopsis( os ); + if( !m_options.empty() ) { + os << " [options]\n\nwhere options are: \n"; + optUsage( os, 2 ); + } + os << "\n"; + } + std::string usage( std::string const& procName ) const { + std::ostringstream oss; + usage( oss, procName ); + return oss.str(); + } + + ConfigT parse( std::vector const& args ) const { + ConfigT config; + parseInto( args, config ); + return config; + } + + std::vector parseInto( std::vector const& args, ConfigT& config ) const { + std::string processName = args.empty() ? std::string() : args[0]; + std::size_t lastSlash = processName.find_last_of( "/\\" ); + if( lastSlash != std::string::npos ) + processName = processName.substr( lastSlash+1 ); + m_boundProcessName.set( config, processName ); + std::vector tokens; + Parser parser; + parser.parseIntoTokens( args, tokens ); + return populate( tokens, config ); + } + + std::vector populate( std::vector const& tokens, ConfigT& config ) const { + validate(); + std::vector unusedTokens = populateOptions( tokens, config ); + unusedTokens = populateFixedArgs( unusedTokens, config ); + unusedTokens = populateFloatingArgs( unusedTokens, config ); + return unusedTokens; + } + + std::vector populateOptions( std::vector const& tokens, ConfigT& config ) const { + std::vector unusedTokens; + std::vector errors; + for( std::size_t i = 0; i < tokens.size(); ++i ) { + Parser::Token const& token = tokens[i]; + typename std::vector::const_iterator it = m_options.begin(), itEnd = m_options.end(); + for(; it != itEnd; ++it ) { + Arg const& arg = *it; + + try { + if( ( token.type == Parser::Token::ShortOpt && arg.hasShortName( token.data ) ) || + ( token.type == Parser::Token::LongOpt && arg.hasLongName( token.data ) ) ) { + if( arg.takesArg() ) { + if( i == tokens.size()-1 || tokens[i+1].type != Parser::Token::Positional ) + errors.push_back( "Expected argument to option: " + token.data ); + else + arg.boundField.set( config, tokens[++i].data ); + } + else { + arg.boundField.set( config, "true" ); + } + break; + } + } + catch( std::exception& ex ) { + errors.push_back( std::string( ex.what() ) + "\n- while parsing: (" + arg.commands() + ")" ); + } + } + if( it == itEnd ) { + if( token.type == Parser::Token::Positional || !m_throwOnUnrecognisedTokens ) + unusedTokens.push_back( token ); + else if( errors.empty() && m_throwOnUnrecognisedTokens ) + errors.push_back( "unrecognised option: " + token.data ); + } + } + if( !errors.empty() ) { + std::ostringstream oss; + for( std::vector::const_iterator it = errors.begin(), itEnd = errors.end(); + it != itEnd; + ++it ) { + if( it != errors.begin() ) + oss << "\n"; + oss << *it; + } + throw std::runtime_error( oss.str() ); + } + return unusedTokens; + } + std::vector populateFixedArgs( std::vector const& tokens, ConfigT& config ) const { + std::vector unusedTokens; + int position = 1; + for( std::size_t i = 0; i < tokens.size(); ++i ) { + Parser::Token const& token = tokens[i]; + typename std::map::const_iterator it = m_positionalArgs.find( position ); + if( it != m_positionalArgs.end() ) + it->second.boundField.set( config, token.data ); + else + unusedTokens.push_back( token ); + if( token.type == Parser::Token::Positional ) + position++; + } + return unusedTokens; + } + std::vector populateFloatingArgs( std::vector const& tokens, ConfigT& config ) const { + if( !m_floatingArg.get() ) + return tokens; + std::vector unusedTokens; + for( std::size_t i = 0; i < tokens.size(); ++i ) { + Parser::Token const& token = tokens[i]; + if( token.type == Parser::Token::Positional ) + m_floatingArg->boundField.set( config, token.data ); + else + unusedTokens.push_back( token ); + } + return unusedTokens; + } + + void validate() const + { + if( m_options.empty() && m_positionalArgs.empty() && !m_floatingArg.get() ) + throw std::logic_error( "No options or arguments specified" ); + + for( typename std::vector::const_iterator it = m_options.begin(), + itEnd = m_options.end(); + it != itEnd; ++it ) + it->validate(); + } + + private: + Detail::BoundArgFunction m_boundProcessName; + std::vector m_options; + std::map m_positionalArgs; + ArgAutoPtr m_floatingArg; + int m_highestSpecifiedArgPosition; + bool m_throwOnUnrecognisedTokens; + }; + +} // end namespace Clara + +STITCH_CLARA_CLOSE_NAMESPACE +#undef STITCH_CLARA_OPEN_NAMESPACE +#undef STITCH_CLARA_CLOSE_NAMESPACE + +#endif // TWOBLUECUBES_CLARA_H_INCLUDED +#undef STITCH_CLARA_OPEN_NAMESPACE + +// Restore Clara's value for console width, if present +#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH +#define CLARA_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH +#undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH +#endif + +#include +#include + +namespace Catch { + + inline void abortAfterFirst( ConfigData& config ) { config.abortAfter = 1; } + inline void abortAfterX( ConfigData& config, int x ) { + if( x < 1 ) + throw std::runtime_error( "Value after -x or --abortAfter must be greater than zero" ); + config.abortAfter = x; + } + inline void addTestOrTags( ConfigData& config, std::string const& _testSpec ) { config.testsOrTags.push_back( _testSpec ); } + inline void addSectionToRun( ConfigData& config, std::string const& sectionName ) { config.sectionsToRun.push_back( sectionName ); } + inline void addReporterName( ConfigData& config, std::string const& _reporterName ) { config.reporterNames.push_back( _reporterName ); } + + inline void addWarning( ConfigData& config, std::string const& _warning ) { + if( _warning == "NoAssertions" ) + config.warnings = static_cast( config.warnings | WarnAbout::NoAssertions ); + else + throw std::runtime_error( "Unrecognised warning: '" + _warning + '\'' ); + } + inline void setOrder( ConfigData& config, std::string const& order ) { + if( startsWith( "declared", order ) ) + config.runOrder = RunTests::InDeclarationOrder; + else if( startsWith( "lexical", order ) ) + config.runOrder = RunTests::InLexicographicalOrder; + else if( startsWith( "random", order ) ) + config.runOrder = RunTests::InRandomOrder; + else + throw std::runtime_error( "Unrecognised ordering: '" + order + '\'' ); + } + inline void setRngSeed( ConfigData& config, std::string const& seed ) { + if( seed == "time" ) { + config.rngSeed = static_cast( std::time(0) ); + } + else { + std::stringstream ss; + ss << seed; + ss >> config.rngSeed; + if( ss.fail() ) + throw std::runtime_error( "Argument to --rng-seed should be the word 'time' or a number" ); + } + } + inline void setVerbosity( ConfigData& config, int level ) { + // !TBD: accept strings? + config.verbosity = static_cast( level ); + } + inline void setShowDurations( ConfigData& config, bool _showDurations ) { + config.showDurations = _showDurations + ? ShowDurations::Always + : ShowDurations::Never; + } + inline void setUseColour( ConfigData& config, std::string const& value ) { + std::string mode = toLower( value ); + + if( mode == "yes" ) + config.useColour = UseColour::Yes; + else if( mode == "no" ) + config.useColour = UseColour::No; + else if( mode == "auto" ) + config.useColour = UseColour::Auto; + else + throw std::runtime_error( "colour mode must be one of: auto, yes or no" ); + } + inline void forceColour( ConfigData& config ) { + config.useColour = UseColour::Yes; + } + inline void loadTestNamesFromFile( ConfigData& config, std::string const& _filename ) { + std::ifstream f( _filename.c_str() ); + if( !f.is_open() ) + throw std::domain_error( "Unable to load input file: " + _filename ); + + std::string line; + while( std::getline( f, line ) ) { + line = trim(line); + if( !line.empty() && !startsWith( line, '#' ) ) { + if( !startsWith( line, '"' ) ) + line = '"' + line + '"'; + addTestOrTags( config, line + ',' ); + } + } + } + + inline Clara::CommandLine makeCommandLineParser() { + + using namespace Clara; + CommandLine cli; + + cli.bindProcessName( &ConfigData::processName ); + + cli["-?"]["-h"]["--help"] + .describe( "display usage information" ) + .bind( &ConfigData::showHelp ); + + cli["-l"]["--list-tests"] + .describe( "list all/matching test cases" ) + .bind( &ConfigData::listTests ); + + cli["-t"]["--list-tags"] + .describe( "list all/matching tags" ) + .bind( &ConfigData::listTags ); + + cli["-s"]["--success"] + .describe( "include successful tests in output" ) + .bind( &ConfigData::showSuccessfulTests ); + + cli["-b"]["--break"] + .describe( "break into debugger on failure" ) + .bind( &ConfigData::shouldDebugBreak ); + + cli["-e"]["--nothrow"] + .describe( "skip exception tests" ) + .bind( &ConfigData::noThrow ); + + cli["-i"]["--invisibles"] + .describe( "show invisibles (tabs, newlines)" ) + .bind( &ConfigData::showInvisibles ); + + cli["-o"]["--out"] + .describe( "output filename" ) + .bind( &ConfigData::outputFilename, "filename" ); + + cli["-r"]["--reporter"] +// .placeholder( "name[:filename]" ) + .describe( "reporter to use (defaults to console)" ) + .bind( &addReporterName, "name" ); + + cli["-n"]["--name"] + .describe( "suite name" ) + .bind( &ConfigData::name, "name" ); + + cli["-a"]["--abort"] + .describe( "abort at first failure" ) + .bind( &abortAfterFirst ); + + cli["-x"]["--abortx"] + .describe( "abort after x failures" ) + .bind( &abortAfterX, "no. failures" ); + + cli["-w"]["--warn"] + .describe( "enable warnings" ) + .bind( &addWarning, "warning name" ); + +// - needs updating if reinstated +// cli.into( &setVerbosity ) +// .describe( "level of verbosity (0=no output)" ) +// .shortOpt( "v") +// .longOpt( "verbosity" ) +// .placeholder( "level" ); + + cli[_] + .describe( "which test or tests to use" ) + .bind( &addTestOrTags, "test name, pattern or tags" ); + + cli["-d"]["--durations"] + .describe( "show test durations" ) + .bind( &setShowDurations, "yes|no" ); + + cli["-f"]["--input-file"] + .describe( "load test names to run from a file" ) + .bind( &loadTestNamesFromFile, "filename" ); + + cli["-#"]["--filenames-as-tags"] + .describe( "adds a tag for the filename" ) + .bind( &ConfigData::filenamesAsTags ); + + cli["-c"]["--section"] + .describe( "specify section to run" ) + .bind( &addSectionToRun, "section name" ); + + // Less common commands which don't have a short form + cli["--list-test-names-only"] + .describe( "list all/matching test cases names only" ) + .bind( &ConfigData::listTestNamesOnly ); + + cli["--list-extra-info"] + .describe( "list all/matching test cases with more info" ) + .bind( &ConfigData::listExtraInfo ); + + cli["--list-reporters"] + .describe( "list all reporters" ) + .bind( &ConfigData::listReporters ); + + cli["--order"] + .describe( "test case order (defaults to decl)" ) + .bind( &setOrder, "decl|lex|rand" ); + + cli["--rng-seed"] + .describe( "set a specific seed for random numbers" ) + .bind( &setRngSeed, "'time'|number" ); + + cli["--force-colour"] + .describe( "force colourised output (deprecated)" ) + .bind( &forceColour ); + + cli["--use-colour"] + .describe( "should output be colourised" ) + .bind( &setUseColour, "yes|no" ); + + return cli; + } + +} // end namespace Catch + +// #included from: internal/catch_list.hpp +#define TWOBLUECUBES_CATCH_LIST_HPP_INCLUDED + +// #included from: catch_text.h +#define TWOBLUECUBES_CATCH_TEXT_H_INCLUDED + +#define TBC_TEXT_FORMAT_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH + +#define CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE Catch +// #included from: ../external/tbc_text_format.h +// Only use header guard if we are not using an outer namespace +#ifndef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE +# ifdef TWOBLUECUBES_TEXT_FORMAT_H_INCLUDED +# ifndef TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED +# define TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED +# endif +# else +# define TWOBLUECUBES_TEXT_FORMAT_H_INCLUDED +# endif +#endif +#ifndef TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED +#include +#include +#include + +// Use optional outer namespace +#ifdef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE +namespace CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE { +#endif + +namespace Tbc { + +#ifdef TBC_TEXT_FORMAT_CONSOLE_WIDTH + const unsigned int consoleWidth = TBC_TEXT_FORMAT_CONSOLE_WIDTH; +#else + const unsigned int consoleWidth = 80; +#endif + + struct TextAttributes { + TextAttributes() + : initialIndent( std::string::npos ), + indent( 0 ), + width( consoleWidth-1 ) + {} + + TextAttributes& setInitialIndent( std::size_t _value ) { initialIndent = _value; return *this; } + TextAttributes& setIndent( std::size_t _value ) { indent = _value; return *this; } + TextAttributes& setWidth( std::size_t _value ) { width = _value; return *this; } + + std::size_t initialIndent; // indent of first line, or npos + std::size_t indent; // indent of subsequent lines, or all if initialIndent is npos + std::size_t width; // maximum width of text, including indent. Longer text will wrap + }; + + class Text { + public: + Text( std::string const& _str, TextAttributes const& _attr = TextAttributes() ) + : attr( _attr ) + { + const std::string wrappableBeforeChars = "[({<\t"; + const std::string wrappableAfterChars = "])}>-,./|\\"; + const std::string wrappableInsteadOfChars = " \n\r"; + std::string indent = _attr.initialIndent != std::string::npos + ? std::string( _attr.initialIndent, ' ' ) + : std::string( _attr.indent, ' ' ); + + typedef std::string::const_iterator iterator; + iterator it = _str.begin(); + const iterator strEnd = _str.end(); + + while( it != strEnd ) { + + if( lines.size() >= 1000 ) { + lines.push_back( "... message truncated due to excessive size" ); + return; + } + + std::string suffix; + std::size_t width = (std::min)( static_cast( strEnd-it ), _attr.width-static_cast( indent.size() ) ); + iterator itEnd = it+width; + iterator itNext = _str.end(); + + iterator itNewLine = std::find( it, itEnd, '\n' ); + if( itNewLine != itEnd ) + itEnd = itNewLine; + + if( itEnd != strEnd ) { + bool foundWrapPoint = false; + iterator findIt = itEnd; + do { + if( wrappableAfterChars.find( *findIt ) != std::string::npos && findIt != itEnd ) { + itEnd = findIt+1; + itNext = findIt+1; + foundWrapPoint = true; + } + else if( findIt > it && wrappableBeforeChars.find( *findIt ) != std::string::npos ) { + itEnd = findIt; + itNext = findIt; + foundWrapPoint = true; + } + else if( wrappableInsteadOfChars.find( *findIt ) != std::string::npos ) { + itNext = findIt+1; + itEnd = findIt; + foundWrapPoint = true; + } + if( findIt == it ) + break; + else + --findIt; + } + while( !foundWrapPoint ); + + if( !foundWrapPoint ) { + // No good wrap char, so we'll break mid word and add a hyphen + --itEnd; + itNext = itEnd; + suffix = "-"; + } + else { + while( itEnd > it && wrappableInsteadOfChars.find( *(itEnd-1) ) != std::string::npos ) + --itEnd; + } + } + lines.push_back( indent + std::string( it, itEnd ) + suffix ); + + if( indent.size() != _attr.indent ) + indent = std::string( _attr.indent, ' ' ); + it = itNext; + } + } + + typedef std::vector::const_iterator const_iterator; + + const_iterator begin() const { return lines.begin(); } + const_iterator end() const { return lines.end(); } + std::string const& last() const { return lines.back(); } + std::size_t size() const { return lines.size(); } + std::string const& operator[]( std::size_t _index ) const { return lines[_index]; } + std::string toString() const { + std::ostringstream oss; + oss << *this; + return oss.str(); + } + + inline friend std::ostream& operator << ( std::ostream& _stream, Text const& _text ) { + for( Text::const_iterator it = _text.begin(), itEnd = _text.end(); + it != itEnd; ++it ) { + if( it != _text.begin() ) + _stream << "\n"; + _stream << *it; + } + return _stream; + } + + private: + std::string str; + TextAttributes attr; + std::vector lines; + }; + +} // end namespace Tbc + +#ifdef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE +} // end outer namespace +#endif + +#endif // TWOBLUECUBES_TEXT_FORMAT_H_ALREADY_INCLUDED +#undef CLICHE_TBC_TEXT_FORMAT_OUTER_NAMESPACE + +namespace Catch { + using Tbc::Text; + using Tbc::TextAttributes; +} + +// #included from: catch_console_colour.hpp +#define TWOBLUECUBES_CATCH_CONSOLE_COLOUR_HPP_INCLUDED + +namespace Catch { + + struct Colour { + enum Code { + None = 0, + + White, + Red, + Green, + Blue, + Cyan, + Yellow, + Grey, + + Bright = 0x10, + + BrightRed = Bright | Red, + BrightGreen = Bright | Green, + LightGrey = Bright | Grey, + BrightWhite = Bright | White, + + // By intention + FileName = LightGrey, + Warning = Yellow, + ResultError = BrightRed, + ResultSuccess = BrightGreen, + ResultExpectedFailure = Warning, + + Error = BrightRed, + Success = Green, + + OriginalExpression = Cyan, + ReconstructedExpression = Yellow, + + SecondaryText = LightGrey, + Headers = White + }; + + // Use constructed object for RAII guard + Colour( Code _colourCode ); + Colour( Colour const& other ); + ~Colour(); + + // Use static method for one-shot changes + static void use( Code _colourCode ); + + private: + bool m_moved; + }; + + inline std::ostream& operator << ( std::ostream& os, Colour const& ) { return os; } + +} // end namespace Catch + +// #included from: catch_interfaces_reporter.h +#define TWOBLUECUBES_CATCH_INTERFACES_REPORTER_H_INCLUDED + +#include +#include +#include + +namespace Catch +{ + struct ReporterConfig { + explicit ReporterConfig( Ptr const& _fullConfig ) + : m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {} + + ReporterConfig( Ptr const& _fullConfig, std::ostream& _stream ) + : m_stream( &_stream ), m_fullConfig( _fullConfig ) {} + + std::ostream& stream() const { return *m_stream; } + Ptr fullConfig() const { return m_fullConfig; } + + private: + std::ostream* m_stream; + Ptr m_fullConfig; + }; + + struct ReporterPreferences { + ReporterPreferences() + : shouldRedirectStdOut( false ) + {} + + bool shouldRedirectStdOut; + }; + + template + struct LazyStat : Option { + LazyStat() : used( false ) {} + LazyStat& operator=( T const& _value ) { + Option::operator=( _value ); + used = false; + return *this; + } + void reset() { + Option::reset(); + used = false; + } + bool used; + }; + + struct TestRunInfo { + TestRunInfo( std::string const& _name ) : name( _name ) {} + std::string name; + }; + struct GroupInfo { + GroupInfo( std::string const& _name, + std::size_t _groupIndex, + std::size_t _groupsCount ) + : name( _name ), + groupIndex( _groupIndex ), + groupsCounts( _groupsCount ) + {} + + std::string name; + std::size_t groupIndex; + std::size_t groupsCounts; + }; + + struct AssertionStats { + AssertionStats( AssertionResult const& _assertionResult, + std::vector const& _infoMessages, + Totals const& _totals ) + : assertionResult( _assertionResult ), + infoMessages( _infoMessages ), + totals( _totals ) + { + if( assertionResult.hasMessage() ) { + // Copy message into messages list. + // !TBD This should have been done earlier, somewhere + MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() ); + builder << assertionResult.getMessage(); + builder.m_info.message = builder.m_stream.str(); + + infoMessages.push_back( builder.m_info ); + } + } + virtual ~AssertionStats(); + +# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + AssertionStats( AssertionStats const& ) = default; + AssertionStats( AssertionStats && ) = default; + AssertionStats& operator = ( AssertionStats const& ) = default; + AssertionStats& operator = ( AssertionStats && ) = default; +# endif + + AssertionResult assertionResult; + std::vector infoMessages; + Totals totals; + }; + + struct SectionStats { + SectionStats( SectionInfo const& _sectionInfo, + Counts const& _assertions, + double _durationInSeconds, + bool _missingAssertions ) + : sectionInfo( _sectionInfo ), + assertions( _assertions ), + durationInSeconds( _durationInSeconds ), + missingAssertions( _missingAssertions ) + {} + virtual ~SectionStats(); +# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + SectionStats( SectionStats const& ) = default; + SectionStats( SectionStats && ) = default; + SectionStats& operator = ( SectionStats const& ) = default; + SectionStats& operator = ( SectionStats && ) = default; +# endif + + SectionInfo sectionInfo; + Counts assertions; + double durationInSeconds; + bool missingAssertions; + }; + + struct TestCaseStats { + TestCaseStats( TestCaseInfo const& _testInfo, + Totals const& _totals, + std::string const& _stdOut, + std::string const& _stdErr, + bool _aborting ) + : testInfo( _testInfo ), + totals( _totals ), + stdOut( _stdOut ), + stdErr( _stdErr ), + aborting( _aborting ) + {} + virtual ~TestCaseStats(); + +# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + TestCaseStats( TestCaseStats const& ) = default; + TestCaseStats( TestCaseStats && ) = default; + TestCaseStats& operator = ( TestCaseStats const& ) = default; + TestCaseStats& operator = ( TestCaseStats && ) = default; +# endif + + TestCaseInfo testInfo; + Totals totals; + std::string stdOut; + std::string stdErr; + bool aborting; + }; + + struct TestGroupStats { + TestGroupStats( GroupInfo const& _groupInfo, + Totals const& _totals, + bool _aborting ) + : groupInfo( _groupInfo ), + totals( _totals ), + aborting( _aborting ) + {} + TestGroupStats( GroupInfo const& _groupInfo ) + : groupInfo( _groupInfo ), + aborting( false ) + {} + virtual ~TestGroupStats(); + +# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + TestGroupStats( TestGroupStats const& ) = default; + TestGroupStats( TestGroupStats && ) = default; + TestGroupStats& operator = ( TestGroupStats const& ) = default; + TestGroupStats& operator = ( TestGroupStats && ) = default; +# endif + + GroupInfo groupInfo; + Totals totals; + bool aborting; + }; + + struct TestRunStats { + TestRunStats( TestRunInfo const& _runInfo, + Totals const& _totals, + bool _aborting ) + : runInfo( _runInfo ), + totals( _totals ), + aborting( _aborting ) + {} + virtual ~TestRunStats(); + +# ifndef CATCH_CONFIG_CPP11_GENERATED_METHODS + TestRunStats( TestRunStats const& _other ) + : runInfo( _other.runInfo ), + totals( _other.totals ), + aborting( _other.aborting ) + {} +# else + TestRunStats( TestRunStats const& ) = default; + TestRunStats( TestRunStats && ) = default; + TestRunStats& operator = ( TestRunStats const& ) = default; + TestRunStats& operator = ( TestRunStats && ) = default; +# endif + + TestRunInfo runInfo; + Totals totals; + bool aborting; + }; + + class MultipleReporters; + + struct IStreamingReporter : IShared { + virtual ~IStreamingReporter(); + + // Implementing class must also provide the following static method: + // static std::string getDescription(); + + virtual ReporterPreferences getPreferences() const = 0; + + virtual void noMatchingTestCases( std::string const& spec ) = 0; + + virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0; + virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0; + + virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0; + virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0; + + virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0; + + // The return value indicates if the messages buffer should be cleared: + virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0; + + virtual void sectionEnded( SectionStats const& sectionStats ) = 0; + virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0; + virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0; + virtual void testRunEnded( TestRunStats const& testRunStats ) = 0; + + virtual void skipTest( TestCaseInfo const& testInfo ) = 0; + + virtual MultipleReporters* tryAsMulti() { return CATCH_NULL; } + }; + + struct IReporterFactory : IShared { + virtual ~IReporterFactory(); + virtual IStreamingReporter* create( ReporterConfig const& config ) const = 0; + virtual std::string getDescription() const = 0; + }; + + struct IReporterRegistry { + typedef std::map > FactoryMap; + typedef std::vector > Listeners; + + virtual ~IReporterRegistry(); + virtual IStreamingReporter* create( std::string const& name, Ptr const& config ) const = 0; + virtual FactoryMap const& getFactories() const = 0; + virtual Listeners const& getListeners() const = 0; + }; + + Ptr addReporter( Ptr const& existingReporter, Ptr const& additionalReporter ); + +} + +#include +#include + +namespace Catch { + + inline std::size_t listTests( Config const& config ) { + + TestSpec testSpec = config.testSpec(); + if( config.testSpec().hasFilters() ) + Catch::cout() << "Matching test cases:\n"; + else { + Catch::cout() << "All available test cases:\n"; + testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec(); + } + + std::size_t matchedTests = 0; + TextAttributes nameAttr, descAttr, tagsAttr; + nameAttr.setInitialIndent( 2 ).setIndent( 4 ); + descAttr.setIndent( 4 ); + tagsAttr.setIndent( 6 ); + + std::vector matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); + for( std::vector::const_iterator it = matchedTestCases.begin(), itEnd = matchedTestCases.end(); + it != itEnd; + ++it ) { + matchedTests++; + TestCaseInfo const& testCaseInfo = it->getTestCaseInfo(); + Colour::Code colour = testCaseInfo.isHidden() + ? Colour::SecondaryText + : Colour::None; + Colour colourGuard( colour ); + + Catch::cout() << Text( testCaseInfo.name, nameAttr ) << std::endl; + if( config.listExtraInfo() ) { + Catch::cout() << " " << testCaseInfo.lineInfo << std::endl; + std::string description = testCaseInfo.description; + if( description.empty() ) + description = "(NO DESCRIPTION)"; + Catch::cout() << Text( description, descAttr ) << std::endl; + } + if( !testCaseInfo.tags.empty() ) + Catch::cout() << Text( testCaseInfo.tagsAsString, tagsAttr ) << std::endl; + } + + if( !config.testSpec().hasFilters() ) + Catch::cout() << pluralise( matchedTests, "test case" ) << '\n' << std::endl; + else + Catch::cout() << pluralise( matchedTests, "matching test case" ) << '\n' << std::endl; + return matchedTests; + } + + inline std::size_t listTestsNamesOnly( Config const& config ) { + TestSpec testSpec = config.testSpec(); + if( !config.testSpec().hasFilters() ) + testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec(); + std::size_t matchedTests = 0; + std::vector matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); + for( std::vector::const_iterator it = matchedTestCases.begin(), itEnd = matchedTestCases.end(); + it != itEnd; + ++it ) { + matchedTests++; + TestCaseInfo const& testCaseInfo = it->getTestCaseInfo(); + if( startsWith( testCaseInfo.name, '#' ) ) + Catch::cout() << '"' << testCaseInfo.name << '"'; + else + Catch::cout() << testCaseInfo.name; + if ( config.listExtraInfo() ) + Catch::cout() << "\t@" << testCaseInfo.lineInfo; + Catch::cout() << std::endl; + } + return matchedTests; + } + + struct TagInfo { + TagInfo() : count ( 0 ) {} + void add( std::string const& spelling ) { + ++count; + spellings.insert( spelling ); + } + std::string all() const { + std::string out; + for( std::set::const_iterator it = spellings.begin(), itEnd = spellings.end(); + it != itEnd; + ++it ) + out += "[" + *it + "]"; + return out; + } + std::set spellings; + std::size_t count; + }; + + inline std::size_t listTags( Config const& config ) { + TestSpec testSpec = config.testSpec(); + if( config.testSpec().hasFilters() ) + Catch::cout() << "Tags for matching test cases:\n"; + else { + Catch::cout() << "All available tags:\n"; + testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec(); + } + + std::map tagCounts; + + std::vector matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); + for( std::vector::const_iterator it = matchedTestCases.begin(), itEnd = matchedTestCases.end(); + it != itEnd; + ++it ) { + for( std::set::const_iterator tagIt = it->getTestCaseInfo().tags.begin(), + tagItEnd = it->getTestCaseInfo().tags.end(); + tagIt != tagItEnd; + ++tagIt ) { + std::string tagName = *tagIt; + std::string lcaseTagName = toLower( tagName ); + std::map::iterator countIt = tagCounts.find( lcaseTagName ); + if( countIt == tagCounts.end() ) + countIt = tagCounts.insert( std::make_pair( lcaseTagName, TagInfo() ) ).first; + countIt->second.add( tagName ); + } + } + + for( std::map::const_iterator countIt = tagCounts.begin(), + countItEnd = tagCounts.end(); + countIt != countItEnd; + ++countIt ) { + std::ostringstream oss; + oss << " " << std::setw(2) << countIt->second.count << " "; + Text wrapper( countIt->second.all(), TextAttributes() + .setInitialIndent( 0 ) + .setIndent( oss.str().size() ) + .setWidth( CATCH_CONFIG_CONSOLE_WIDTH-10 ) ); + Catch::cout() << oss.str() << wrapper << '\n'; + } + Catch::cout() << pluralise( tagCounts.size(), "tag" ) << '\n' << std::endl; + return tagCounts.size(); + } + + inline std::size_t listReporters( Config const& /*config*/ ) { + Catch::cout() << "Available reporters:\n"; + IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories(); + IReporterRegistry::FactoryMap::const_iterator itBegin = factories.begin(), itEnd = factories.end(), it; + std::size_t maxNameLen = 0; + for(it = itBegin; it != itEnd; ++it ) + maxNameLen = (std::max)( maxNameLen, it->first.size() ); + + for(it = itBegin; it != itEnd; ++it ) { + Text wrapper( it->second->getDescription(), TextAttributes() + .setInitialIndent( 0 ) + .setIndent( 7+maxNameLen ) + .setWidth( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 ) ); + Catch::cout() << " " + << it->first + << ':' + << std::string( maxNameLen - it->first.size() + 2, ' ' ) + << wrapper << '\n'; + } + Catch::cout() << std::endl; + return factories.size(); + } + + inline Option list( Config const& config ) { + Option listedCount; + if( config.listTests() || ( config.listExtraInfo() && !config.listTestNamesOnly() ) ) + listedCount = listedCount.valueOr(0) + listTests( config ); + if( config.listTestNamesOnly() ) + listedCount = listedCount.valueOr(0) + listTestsNamesOnly( config ); + if( config.listTags() ) + listedCount = listedCount.valueOr(0) + listTags( config ); + if( config.listReporters() ) + listedCount = listedCount.valueOr(0) + listReporters( config ); + return listedCount; + } + +} // end namespace Catch + +// #included from: internal/catch_run_context.hpp +#define TWOBLUECUBES_CATCH_RUNNER_IMPL_HPP_INCLUDED + +// #included from: catch_test_case_tracker.hpp +#define TWOBLUECUBES_CATCH_TEST_CASE_TRACKER_HPP_INCLUDED + +#include +#include +#include +#include +#include + +CATCH_INTERNAL_SUPPRESS_ETD_WARNINGS + +namespace Catch { +namespace TestCaseTracking { + + struct NameAndLocation { + std::string name; + SourceLineInfo location; + + NameAndLocation( std::string const& _name, SourceLineInfo const& _location ) + : name( _name ), + location( _location ) + {} + }; + + struct ITracker : SharedImpl<> { + virtual ~ITracker(); + + // static queries + virtual NameAndLocation const& nameAndLocation() const = 0; + + // dynamic queries + virtual bool isComplete() const = 0; // Successfully completed or failed + virtual bool isSuccessfullyCompleted() const = 0; + virtual bool isOpen() const = 0; // Started but not complete + virtual bool hasChildren() const = 0; + + virtual ITracker& parent() = 0; + + // actions + virtual void close() = 0; // Successfully complete + virtual void fail() = 0; + virtual void markAsNeedingAnotherRun() = 0; + + virtual void addChild( Ptr const& child ) = 0; + virtual ITracker* findChild( NameAndLocation const& nameAndLocation ) = 0; + virtual void openChild() = 0; + + // Debug/ checking + virtual bool isSectionTracker() const = 0; + virtual bool isIndexTracker() const = 0; + }; + + class TrackerContext { + + enum RunState { + NotStarted, + Executing, + CompletedCycle + }; + + Ptr m_rootTracker; + ITracker* m_currentTracker; + RunState m_runState; + + public: + + static TrackerContext& instance() { + static TrackerContext s_instance; + return s_instance; + } + + TrackerContext() + : m_currentTracker( CATCH_NULL ), + m_runState( NotStarted ) + {} + + ITracker& startRun(); + + void endRun() { + m_rootTracker.reset(); + m_currentTracker = CATCH_NULL; + m_runState = NotStarted; + } + + void startCycle() { + m_currentTracker = m_rootTracker.get(); + m_runState = Executing; + } + void completeCycle() { + m_runState = CompletedCycle; + } + + bool completedCycle() const { + return m_runState == CompletedCycle; + } + ITracker& currentTracker() { + return *m_currentTracker; + } + void setCurrentTracker( ITracker* tracker ) { + m_currentTracker = tracker; + } + }; + + class TrackerBase : public ITracker { + protected: + enum CycleState { + NotStarted, + Executing, + ExecutingChildren, + NeedsAnotherRun, + CompletedSuccessfully, + Failed + }; + class TrackerHasName { + NameAndLocation m_nameAndLocation; + public: + TrackerHasName( NameAndLocation const& nameAndLocation ) : m_nameAndLocation( nameAndLocation ) {} + bool operator ()( Ptr const& tracker ) { + return + tracker->nameAndLocation().name == m_nameAndLocation.name && + tracker->nameAndLocation().location == m_nameAndLocation.location; + } + }; + typedef std::vector > Children; + NameAndLocation m_nameAndLocation; + TrackerContext& m_ctx; + ITracker* m_parent; + Children m_children; + CycleState m_runState; + public: + TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : m_nameAndLocation( nameAndLocation ), + m_ctx( ctx ), + m_parent( parent ), + m_runState( NotStarted ) + {} + virtual ~TrackerBase(); + + virtual NameAndLocation const& nameAndLocation() const CATCH_OVERRIDE { + return m_nameAndLocation; + } + virtual bool isComplete() const CATCH_OVERRIDE { + return m_runState == CompletedSuccessfully || m_runState == Failed; + } + virtual bool isSuccessfullyCompleted() const CATCH_OVERRIDE { + return m_runState == CompletedSuccessfully; + } + virtual bool isOpen() const CATCH_OVERRIDE { + return m_runState != NotStarted && !isComplete(); + } + virtual bool hasChildren() const CATCH_OVERRIDE { + return !m_children.empty(); + } + + virtual void addChild( Ptr const& child ) CATCH_OVERRIDE { + m_children.push_back( child ); + } + + virtual ITracker* findChild( NameAndLocation const& nameAndLocation ) CATCH_OVERRIDE { + Children::const_iterator it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( nameAndLocation ) ); + return( it != m_children.end() ) + ? it->get() + : CATCH_NULL; + } + virtual ITracker& parent() CATCH_OVERRIDE { + assert( m_parent ); // Should always be non-null except for root + return *m_parent; + } + + virtual void openChild() CATCH_OVERRIDE { + if( m_runState != ExecutingChildren ) { + m_runState = ExecutingChildren; + if( m_parent ) + m_parent->openChild(); + } + } + + virtual bool isSectionTracker() const CATCH_OVERRIDE { return false; } + virtual bool isIndexTracker() const CATCH_OVERRIDE { return false; } + + void open() { + m_runState = Executing; + moveToThis(); + if( m_parent ) + m_parent->openChild(); + } + + virtual void close() CATCH_OVERRIDE { + + // Close any still open children (e.g. generators) + while( &m_ctx.currentTracker() != this ) + m_ctx.currentTracker().close(); + + switch( m_runState ) { + case NotStarted: + case CompletedSuccessfully: + case Failed: + throw std::logic_error( "Illogical state" ); + + case NeedsAnotherRun: + break;; + + case Executing: + m_runState = CompletedSuccessfully; + break; + case ExecutingChildren: + if( m_children.empty() || m_children.back()->isComplete() ) + m_runState = CompletedSuccessfully; + break; + + default: + throw std::logic_error( "Unexpected state" ); + } + moveToParent(); + m_ctx.completeCycle(); + } + virtual void fail() CATCH_OVERRIDE { + m_runState = Failed; + if( m_parent ) + m_parent->markAsNeedingAnotherRun(); + moveToParent(); + m_ctx.completeCycle(); + } + virtual void markAsNeedingAnotherRun() CATCH_OVERRIDE { + m_runState = NeedsAnotherRun; + } + private: + void moveToParent() { + assert( m_parent ); + m_ctx.setCurrentTracker( m_parent ); + } + void moveToThis() { + m_ctx.setCurrentTracker( this ); + } + }; + + class SectionTracker : public TrackerBase { + std::vector m_filters; + public: + SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : TrackerBase( nameAndLocation, ctx, parent ) + { + if( parent ) { + while( !parent->isSectionTracker() ) + parent = &parent->parent(); + + SectionTracker& parentSection = static_cast( *parent ); + addNextFilters( parentSection.m_filters ); + } + } + virtual ~SectionTracker(); + + virtual bool isSectionTracker() const CATCH_OVERRIDE { return true; } + + static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) { + SectionTracker* section = CATCH_NULL; + + ITracker& currentTracker = ctx.currentTracker(); + if( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { + assert( childTracker ); + assert( childTracker->isSectionTracker() ); + section = static_cast( childTracker ); + } + else { + section = new SectionTracker( nameAndLocation, ctx, ¤tTracker ); + currentTracker.addChild( section ); + } + if( !ctx.completedCycle() ) + section->tryOpen(); + return *section; + } + + void tryOpen() { + if( !isComplete() && (m_filters.empty() || m_filters[0].empty() || m_filters[0] == m_nameAndLocation.name ) ) + open(); + } + + void addInitialFilters( std::vector const& filters ) { + if( !filters.empty() ) { + m_filters.push_back(""); // Root - should never be consulted + m_filters.push_back(""); // Test Case - not a section filter + m_filters.insert( m_filters.end(), filters.begin(), filters.end() ); + } + } + void addNextFilters( std::vector const& filters ) { + if( filters.size() > 1 ) + m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() ); + } + }; + + class IndexTracker : public TrackerBase { + int m_size; + int m_index; + public: + IndexTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent, int size ) + : TrackerBase( nameAndLocation, ctx, parent ), + m_size( size ), + m_index( -1 ) + {} + virtual ~IndexTracker(); + + virtual bool isIndexTracker() const CATCH_OVERRIDE { return true; } + + static IndexTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation, int size ) { + IndexTracker* tracker = CATCH_NULL; + + ITracker& currentTracker = ctx.currentTracker(); + if( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { + assert( childTracker ); + assert( childTracker->isIndexTracker() ); + tracker = static_cast( childTracker ); + } + else { + tracker = new IndexTracker( nameAndLocation, ctx, ¤tTracker, size ); + currentTracker.addChild( tracker ); + } + + if( !ctx.completedCycle() && !tracker->isComplete() ) { + if( tracker->m_runState != ExecutingChildren && tracker->m_runState != NeedsAnotherRun ) + tracker->moveNext(); + tracker->open(); + } + + return *tracker; + } + + int index() const { return m_index; } + + void moveNext() { + m_index++; + m_children.clear(); + } + + virtual void close() CATCH_OVERRIDE { + TrackerBase::close(); + if( m_runState == CompletedSuccessfully && m_index < m_size-1 ) + m_runState = Executing; + } + }; + + inline ITracker& TrackerContext::startRun() { + m_rootTracker = new SectionTracker( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, CATCH_NULL ); + m_currentTracker = CATCH_NULL; + m_runState = Executing; + return *m_rootTracker; + } + +} // namespace TestCaseTracking + +using TestCaseTracking::ITracker; +using TestCaseTracking::TrackerContext; +using TestCaseTracking::SectionTracker; +using TestCaseTracking::IndexTracker; + +} // namespace Catch + +CATCH_INTERNAL_UNSUPPRESS_ETD_WARNINGS + +// #included from: catch_fatal_condition.hpp +#define TWOBLUECUBES_CATCH_FATAL_CONDITION_H_INCLUDED + +namespace Catch { + + // Report the error condition + inline void reportFatal( std::string const& message ) { + IContext& context = Catch::getCurrentContext(); + IResultCapture* resultCapture = context.getResultCapture(); + resultCapture->handleFatalErrorCondition( message ); + } + +} // namespace Catch + +#if defined ( CATCH_PLATFORM_WINDOWS ) ///////////////////////////////////////// +// #included from: catch_windows_h_proxy.h + +#define TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED + +#ifdef CATCH_DEFINES_NOMINMAX +# define NOMINMAX +#endif +#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif + +#ifdef __AFXDLL +#include +#else +#include +#endif + +#ifdef CATCH_DEFINES_NOMINMAX +# undef NOMINMAX +#endif +#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# undef WIN32_LEAN_AND_MEAN +#endif + + +# if !defined ( CATCH_CONFIG_WINDOWS_SEH ) + +namespace Catch { + struct FatalConditionHandler { + void reset() {} + }; +} + +# else // CATCH_CONFIG_WINDOWS_SEH is defined + +namespace Catch { + + struct SignalDefs { DWORD id; const char* name; }; + extern SignalDefs signalDefs[]; + // There is no 1-1 mapping between signals and windows exceptions. + // Windows can easily distinguish between SO and SigSegV, + // but SigInt, SigTerm, etc are handled differently. + SignalDefs signalDefs[] = { + { EXCEPTION_ILLEGAL_INSTRUCTION, "SIGILL - Illegal instruction signal" }, + { EXCEPTION_STACK_OVERFLOW, "SIGSEGV - Stack overflow" }, + { EXCEPTION_ACCESS_VIOLATION, "SIGSEGV - Segmentation violation signal" }, + { EXCEPTION_INT_DIVIDE_BY_ZERO, "Divide by zero error" }, + }; + + struct FatalConditionHandler { + + static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { + for (int i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { + if (ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) { + reportFatal(signalDefs[i].name); + } + } + // If its not an exception we care about, pass it along. + // This stops us from eating debugger breaks etc. + return EXCEPTION_CONTINUE_SEARCH; + } + + FatalConditionHandler() { + isSet = true; + // 32k seems enough for Catch to handle stack overflow, + // but the value was found experimentally, so there is no strong guarantee + guaranteeSize = 32 * 1024; + exceptionHandlerHandle = CATCH_NULL; + // Register as first handler in current chain + exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); + // Pass in guarantee size to be filled + SetThreadStackGuarantee(&guaranteeSize); + } + + static void reset() { + if (isSet) { + // Unregister handler and restore the old guarantee + RemoveVectoredExceptionHandler(exceptionHandlerHandle); + SetThreadStackGuarantee(&guaranteeSize); + exceptionHandlerHandle = CATCH_NULL; + isSet = false; + } + } + + ~FatalConditionHandler() { + reset(); + } + private: + static bool isSet; + static ULONG guaranteeSize; + static PVOID exceptionHandlerHandle; + }; + + bool FatalConditionHandler::isSet = false; + ULONG FatalConditionHandler::guaranteeSize = 0; + PVOID FatalConditionHandler::exceptionHandlerHandle = CATCH_NULL; + +} // namespace Catch + +# endif // CATCH_CONFIG_WINDOWS_SEH + +#else // Not Windows - assumed to be POSIX compatible ////////////////////////// + +# if !defined(CATCH_CONFIG_POSIX_SIGNALS) + +namespace Catch { + struct FatalConditionHandler { + void reset() {} + }; +} + +# else // CATCH_CONFIG_POSIX_SIGNALS is defined + +#include + +namespace Catch { + + struct SignalDefs { + int id; + const char* name; + }; + extern SignalDefs signalDefs[]; + SignalDefs signalDefs[] = { + { SIGINT, "SIGINT - Terminal interrupt signal" }, + { SIGILL, "SIGILL - Illegal instruction signal" }, + { SIGFPE, "SIGFPE - Floating point error signal" }, + { SIGSEGV, "SIGSEGV - Segmentation violation signal" }, + { SIGTERM, "SIGTERM - Termination request signal" }, + { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } + }; + + struct FatalConditionHandler { + + static bool isSet; + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)]; + static stack_t oldSigStack; + static char altStackMem[SIGSTKSZ]; + + static void handleSignal( int sig ) { + std::string name = ""; + for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { + SignalDefs &def = signalDefs[i]; + if (sig == def.id) { + name = def.name; + break; + } + } + reset(); + reportFatal(name); + raise( sig ); + } + + FatalConditionHandler() { + isSet = true; + stack_t sigStack; + sigStack.ss_sp = altStackMem; + sigStack.ss_size = SIGSTKSZ; + sigStack.ss_flags = 0; + sigaltstack(&sigStack, &oldSigStack); + struct sigaction sa = { 0 }; + + sa.sa_handler = handleSignal; + sa.sa_flags = SA_ONSTACK; + for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) { + sigaction(signalDefs[i].id, &sa, &oldSigActions[i]); + } + } + + ~FatalConditionHandler() { + reset(); + } + static void reset() { + if( isSet ) { + // Set signals back to previous values -- hopefully nobody overwrote them in the meantime + for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) { + sigaction(signalDefs[i].id, &oldSigActions[i], CATCH_NULL); + } + // Return the old stack + sigaltstack(&oldSigStack, CATCH_NULL); + isSet = false; + } + } + }; + + bool FatalConditionHandler::isSet = false; + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; + char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; + +} // namespace Catch + +# endif // CATCH_CONFIG_POSIX_SIGNALS + +#endif // not Windows + +#include +#include + +namespace Catch { + + class StreamRedirect { + + public: + StreamRedirect( std::ostream& stream, std::string& targetString ) + : m_stream( stream ), + m_prevBuf( stream.rdbuf() ), + m_targetString( targetString ) + { + stream.rdbuf( m_oss.rdbuf() ); + } + + ~StreamRedirect() { + m_targetString += m_oss.str(); + m_stream.rdbuf( m_prevBuf ); + } + + private: + std::ostream& m_stream; + std::streambuf* m_prevBuf; + std::ostringstream m_oss; + std::string& m_targetString; + }; + + // StdErr has two constituent streams in C++, std::cerr and std::clog + // This means that we need to redirect 2 streams into 1 to keep proper + // order of writes and cannot use StreamRedirect on its own + class StdErrRedirect { + public: + StdErrRedirect(std::string& targetString) + :m_cerrBuf( cerr().rdbuf() ), m_clogBuf(clog().rdbuf()), + m_targetString(targetString){ + cerr().rdbuf(m_oss.rdbuf()); + clog().rdbuf(m_oss.rdbuf()); + } + ~StdErrRedirect() { + m_targetString += m_oss.str(); + cerr().rdbuf(m_cerrBuf); + clog().rdbuf(m_clogBuf); + } + private: + std::streambuf* m_cerrBuf; + std::streambuf* m_clogBuf; + std::ostringstream m_oss; + std::string& m_targetString; + }; + + /////////////////////////////////////////////////////////////////////////// + + class RunContext : public IResultCapture, public IRunner { + + RunContext( RunContext const& ); + void operator =( RunContext const& ); + + public: + + explicit RunContext( Ptr const& _config, Ptr const& reporter ) + : m_runInfo( _config->name() ), + m_context( getCurrentMutableContext() ), + m_activeTestCase( CATCH_NULL ), + m_config( _config ), + m_reporter( reporter ), + m_shouldReportUnexpected ( true ) + { + m_context.setRunner( this ); + m_context.setConfig( m_config ); + m_context.setResultCapture( this ); + m_reporter->testRunStarting( m_runInfo ); + } + + virtual ~RunContext() { + m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, aborting() ) ); + } + + void testGroupStarting( std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount ) { + m_reporter->testGroupStarting( GroupInfo( testSpec, groupIndex, groupsCount ) ); + } + void testGroupEnded( std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount ) { + m_reporter->testGroupEnded( TestGroupStats( GroupInfo( testSpec, groupIndex, groupsCount ), totals, aborting() ) ); + } + + Totals runTest( TestCase const& testCase ) { + Totals prevTotals = m_totals; + + std::string redirectedCout; + std::string redirectedCerr; + + TestCaseInfo testInfo = testCase.getTestCaseInfo(); + + m_reporter->testCaseStarting( testInfo ); + + m_activeTestCase = &testCase; + + do { + ITracker& rootTracker = m_trackerContext.startRun(); + assert( rootTracker.isSectionTracker() ); + static_cast( rootTracker ).addInitialFilters( m_config->getSectionsToRun() ); + do { + m_trackerContext.startCycle(); + m_testCaseTracker = &SectionTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( testInfo.name, testInfo.lineInfo ) ); + runCurrentTest( redirectedCout, redirectedCerr ); + } + while( !m_testCaseTracker->isSuccessfullyCompleted() && !aborting() ); + } + // !TBD: deprecated - this will be replaced by indexed trackers + while( getCurrentContext().advanceGeneratorsForCurrentTest() && !aborting() ); + + Totals deltaTotals = m_totals.delta( prevTotals ); + if( testInfo.expectedToFail() && deltaTotals.testCases.passed > 0 ) { + deltaTotals.assertions.failed++; + deltaTotals.testCases.passed--; + deltaTotals.testCases.failed++; + } + m_totals.testCases += deltaTotals.testCases; + m_reporter->testCaseEnded( TestCaseStats( testInfo, + deltaTotals, + redirectedCout, + redirectedCerr, + aborting() ) ); + + m_activeTestCase = CATCH_NULL; + m_testCaseTracker = CATCH_NULL; + + return deltaTotals; + } + + Ptr config() const { + return m_config; + } + + private: // IResultCapture + + virtual void assertionEnded( AssertionResult const& result ) { + if( result.getResultType() == ResultWas::Ok ) { + m_totals.assertions.passed++; + } + else if( !result.isOk() ) { + m_totals.assertions.failed++; + } + + // We have no use for the return value (whether messages should be cleared), because messages were made scoped + // and should be let to clear themselves out. + static_cast(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals))); + + // Reset working state + m_lastAssertionInfo = AssertionInfo( "", m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition ); + m_lastResult = result; + } + + virtual bool lastAssertionPassed() + { + return m_totals.assertions.passed == (m_prevPassed + 1); + } + + virtual void assertionPassed() + { + m_totals.assertions.passed++; + m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}"; + m_lastAssertionInfo.macroName = ""; + } + + virtual void assertionRun() + { + m_prevPassed = m_totals.assertions.passed; + } + + virtual bool sectionStarted ( + SectionInfo const& sectionInfo, + Counts& assertions + ) + { + ITracker& sectionTracker = SectionTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( sectionInfo.name, sectionInfo.lineInfo ) ); + if( !sectionTracker.isOpen() ) + return false; + m_activeSections.push_back( §ionTracker ); + + m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo; + + m_reporter->sectionStarting( sectionInfo ); + + assertions = m_totals.assertions; + + return true; + } + bool testForMissingAssertions( Counts& assertions ) { + if( assertions.total() != 0 ) + return false; + if( !m_config->warnAboutMissingAssertions() ) + return false; + if( m_trackerContext.currentTracker().hasChildren() ) + return false; + m_totals.assertions.failed++; + assertions.failed++; + return true; + } + + virtual void sectionEnded( SectionEndInfo const& endInfo ) { + Counts assertions = m_totals.assertions - endInfo.prevAssertions; + bool missingAssertions = testForMissingAssertions( assertions ); + + if( !m_activeSections.empty() ) { + m_activeSections.back()->close(); + m_activeSections.pop_back(); + } + + m_reporter->sectionEnded( SectionStats( endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions ) ); + m_messages.clear(); + } + + virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) { + if( m_unfinishedSections.empty() ) + m_activeSections.back()->fail(); + else + m_activeSections.back()->close(); + m_activeSections.pop_back(); + + m_unfinishedSections.push_back( endInfo ); + } + + virtual void pushScopedMessage( MessageInfo const& message ) { + m_messages.push_back( message ); + } + + virtual void popScopedMessage( MessageInfo const& message ) { + m_messages.erase( std::remove( m_messages.begin(), m_messages.end(), message ), m_messages.end() ); + } + + virtual std::string getCurrentTestName() const { + return m_activeTestCase + ? m_activeTestCase->getTestCaseInfo().name + : std::string(); + } + + virtual const AssertionResult* getLastResult() const { + return &m_lastResult; + } + + virtual void exceptionEarlyReported() { + m_shouldReportUnexpected = false; + } + + virtual void handleFatalErrorCondition( std::string const& message ) { + // Don't rebuild the result -- the stringification itself can cause more fatal errors + // Instead, fake a result data. + AssertionResultData tempResult; + tempResult.resultType = ResultWas::FatalErrorCondition; + tempResult.message = message; + AssertionResult result(m_lastAssertionInfo, tempResult); + + getResultCapture().assertionEnded(result); + + handleUnfinishedSections(); + + // Recreate section for test case (as we will lose the one that was in scope) + TestCaseInfo const& testCaseInfo = m_activeTestCase->getTestCaseInfo(); + SectionInfo testCaseSection( testCaseInfo.lineInfo, testCaseInfo.name, testCaseInfo.description ); + + Counts assertions; + assertions.failed = 1; + SectionStats testCaseSectionStats( testCaseSection, assertions, 0, false ); + m_reporter->sectionEnded( testCaseSectionStats ); + + TestCaseInfo testInfo = m_activeTestCase->getTestCaseInfo(); + + Totals deltaTotals; + deltaTotals.testCases.failed = 1; + deltaTotals.assertions.failed = 1; + m_reporter->testCaseEnded( TestCaseStats( testInfo, + deltaTotals, + std::string(), + std::string(), + false ) ); + m_totals.testCases.failed++; + testGroupEnded( std::string(), m_totals, 1, 1 ); + m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, false ) ); + } + + public: + // !TBD We need to do this another way! + bool aborting() const { + return m_totals.assertions.failed == static_cast( m_config->abortAfter() ); + } + + private: + + void runCurrentTest( std::string& redirectedCout, std::string& redirectedCerr ) { + TestCaseInfo const& testCaseInfo = m_activeTestCase->getTestCaseInfo(); + SectionInfo testCaseSection( testCaseInfo.lineInfo, testCaseInfo.name, testCaseInfo.description ); + m_reporter->sectionStarting( testCaseSection ); + Counts prevAssertions = m_totals.assertions; + double duration = 0; + m_shouldReportUnexpected = true; + try { + m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, "", ResultDisposition::Normal ); + + seedRng( *m_config ); + + Timer timer; + timer.start(); + if( m_reporter->getPreferences().shouldRedirectStdOut ) { + StreamRedirect coutRedir( Catch::cout(), redirectedCout ); + StdErrRedirect errRedir( redirectedCerr ); + invokeActiveTestCase(); + } + else { + invokeActiveTestCase(); + } + duration = timer.getElapsedSeconds(); + } + catch( TestFailureException& ) { + // This just means the test was aborted due to failure + } + catch(...) { + // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions + // are reported without translation at the point of origin. + if (m_shouldReportUnexpected) { + makeUnexpectedResultBuilder().useActiveException(); + } + } + m_testCaseTracker->close(); + handleUnfinishedSections(); + m_messages.clear(); + + Counts assertions = m_totals.assertions - prevAssertions; + bool missingAssertions = testForMissingAssertions( assertions ); + + if( testCaseInfo.okToFail() ) { + std::swap( assertions.failedButOk, assertions.failed ); + m_totals.assertions.failed -= assertions.failedButOk; + m_totals.assertions.failedButOk += assertions.failedButOk; + } + + SectionStats testCaseSectionStats( testCaseSection, assertions, duration, missingAssertions ); + m_reporter->sectionEnded( testCaseSectionStats ); + } + + void invokeActiveTestCase() { + FatalConditionHandler fatalConditionHandler; // Handle signals + m_activeTestCase->invoke(); + fatalConditionHandler.reset(); + } + + private: + + ResultBuilder makeUnexpectedResultBuilder() const { + return ResultBuilder( m_lastAssertionInfo.macroName, + m_lastAssertionInfo.lineInfo, + m_lastAssertionInfo.capturedExpression, + m_lastAssertionInfo.resultDisposition ); + } + + void handleUnfinishedSections() { + // If sections ended prematurely due to an exception we stored their + // infos here so we can tear them down outside the unwind process. + for( std::vector::const_reverse_iterator it = m_unfinishedSections.rbegin(), + itEnd = m_unfinishedSections.rend(); + it != itEnd; + ++it ) + sectionEnded( *it ); + m_unfinishedSections.clear(); + } + + TestRunInfo m_runInfo; + IMutableContext& m_context; + TestCase const* m_activeTestCase; + ITracker* m_testCaseTracker; + ITracker* m_currentSectionTracker; + AssertionResult m_lastResult; + + Ptr m_config; + Totals m_totals; + Ptr m_reporter; + std::vector m_messages; + AssertionInfo m_lastAssertionInfo; + std::vector m_unfinishedSections; + std::vector m_activeSections; + TrackerContext m_trackerContext; + size_t m_prevPassed; + bool m_shouldReportUnexpected; + }; + + IResultCapture& getResultCapture() { + if( IResultCapture* capture = getCurrentContext().getResultCapture() ) + return *capture; + else + throw std::logic_error( "No result capture instance" ); + } + +} // end namespace Catch + +// #included from: internal/catch_version.h +#define TWOBLUECUBES_CATCH_VERSION_H_INCLUDED + +namespace Catch { + + // Versioning information + struct Version { + Version( unsigned int _majorVersion, + unsigned int _minorVersion, + unsigned int _patchNumber, + char const * const _branchName, + unsigned int _buildNumber ); + + unsigned int const majorVersion; + unsigned int const minorVersion; + unsigned int const patchNumber; + + // buildNumber is only used if branchName is not null + char const * const branchName; + unsigned int const buildNumber; + + friend std::ostream& operator << ( std::ostream& os, Version const& version ); + + private: + void operator=( Version const& ); + }; + + inline Version libraryVersion(); +} + +#include +#include +#include + +namespace Catch { + + Ptr createReporter( std::string const& reporterName, Ptr const& config ) { + Ptr reporter = getRegistryHub().getReporterRegistry().create( reporterName, config.get() ); + if( !reporter ) { + std::ostringstream oss; + oss << "No reporter registered with name: '" << reporterName << "'"; + throw std::domain_error( oss.str() ); + } + return reporter; + } + +#if !defined(CATCH_CONFIG_DEFAULT_REPORTER) +#define CATCH_CONFIG_DEFAULT_REPORTER "console" +#endif + + Ptr makeReporter( Ptr const& config ) { + std::vector reporters = config->getReporterNames(); + if( reporters.empty() ) + reporters.push_back( CATCH_CONFIG_DEFAULT_REPORTER ); + + Ptr reporter; + for( std::vector::const_iterator it = reporters.begin(), itEnd = reporters.end(); + it != itEnd; + ++it ) + reporter = addReporter( reporter, createReporter( *it, config ) ); + return reporter; + } + Ptr addListeners( Ptr const& config, Ptr reporters ) { + IReporterRegistry::Listeners listeners = getRegistryHub().getReporterRegistry().getListeners(); + for( IReporterRegistry::Listeners::const_iterator it = listeners.begin(), itEnd = listeners.end(); + it != itEnd; + ++it ) + reporters = addReporter(reporters, (*it)->create( ReporterConfig( config ) ) ); + return reporters; + } + + Totals runTests( Ptr const& config ) { + + Ptr iconfig = config.get(); + + Ptr reporter = makeReporter( config ); + reporter = addListeners( iconfig, reporter ); + + RunContext context( iconfig, reporter ); + + Totals totals; + + context.testGroupStarting( config->name(), 1, 1 ); + + TestSpec testSpec = config->testSpec(); + if( !testSpec.hasFilters() ) + testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "~[.]" ).testSpec(); // All not hidden tests + + std::vector const& allTestCases = getAllTestCasesSorted( *iconfig ); + for( std::vector::const_iterator it = allTestCases.begin(), itEnd = allTestCases.end(); + it != itEnd; + ++it ) { + if( !context.aborting() && matchTest( *it, testSpec, *iconfig ) ) + totals += context.runTest( *it ); + else + reporter->skipTest( *it ); + } + + context.testGroupEnded( iconfig->name(), totals, 1, 1 ); + return totals; + } + + void applyFilenamesAsTags( IConfig const& config ) { + std::vector const& tests = getAllTestCasesSorted( config ); + for(std::size_t i = 0; i < tests.size(); ++i ) { + TestCase& test = const_cast( tests[i] ); + std::set tags = test.tags; + + std::string filename = test.lineInfo.file; + std::string::size_type lastSlash = filename.find_last_of( "\\/" ); + if( lastSlash != std::string::npos ) + filename = filename.substr( lastSlash+1 ); + + std::string::size_type lastDot = filename.find_last_of( '.' ); + if( lastDot != std::string::npos ) + filename = filename.substr( 0, lastDot ); + + tags.insert( '#' + filename ); + setTags( test, tags ); + } + } + + class Session : NonCopyable { + static bool alreadyInstantiated; + + public: + + struct OnUnusedOptions { enum DoWhat { Ignore, Fail }; }; + + Session() + : m_cli( makeCommandLineParser() ) { + if( alreadyInstantiated ) { + std::string msg = "Only one instance of Catch::Session can ever be used"; + Catch::cerr() << msg << std::endl; + throw std::logic_error( msg ); + } + alreadyInstantiated = true; + } + ~Session() { + Catch::cleanUp(); + } + + void showHelp( std::string const& processName ) { + Catch::cout() << "\nCatch v" << libraryVersion() << "\n"; + + m_cli.usage( Catch::cout(), processName ); + Catch::cout() << "For more detail usage please see the project docs\n" << std::endl; + } + + int applyCommandLine( int argc, char const* const* const argv, OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) { + try { + m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail ); + m_unusedTokens = m_cli.parseInto( Clara::argsToVector( argc, argv ), m_configData ); + if( m_configData.showHelp ) + showHelp( m_configData.processName ); + m_config.reset(); + } + catch( std::exception& ex ) { + { + Colour colourGuard( Colour::Red ); + Catch::cerr() + << "\nError(s) in input:\n" + << Text( ex.what(), TextAttributes().setIndent(2) ) + << "\n\n"; + } + m_cli.usage( Catch::cout(), m_configData.processName ); + return (std::numeric_limits::max)(); + } + return 0; + } + + void useConfigData( ConfigData const& _configData ) { + m_configData = _configData; + m_config.reset(); + } + + int run( int argc, char const* const* const argv ) { + + int returnCode = applyCommandLine( argc, argv ); + if( returnCode == 0 ) + returnCode = run(); + return returnCode; + } + + #if defined(WIN32) && defined(UNICODE) + int run( int argc, wchar_t const* const* const argv ) { + + char **utf8Argv = new char *[ argc ]; + + for ( int i = 0; i < argc; ++i ) { + int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, NULL, 0, NULL, NULL ); + + utf8Argv[ i ] = new char[ bufSize ]; + + WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, NULL, NULL ); + } + + int returnCode = applyCommandLine( argc, utf8Argv ); + if( returnCode == 0 ) + returnCode = run(); + + for ( int i = 0; i < argc; ++i ) + delete [] utf8Argv[ i ]; + + delete [] utf8Argv; + + return returnCode; + } + #endif + + int run() { + if( m_configData.showHelp ) + return 0; + + try + { + config(); // Force config to be constructed + + seedRng( *m_config ); + + if( m_configData.filenamesAsTags ) + applyFilenamesAsTags( *m_config ); + + // Handle list request + if( Option listed = list( config() ) ) + return static_cast( *listed ); + + return static_cast( runTests( m_config ).assertions.failed ); + } + catch( std::exception& ex ) { + Catch::cerr() << ex.what() << std::endl; + return (std::numeric_limits::max)(); + } + } + + Clara::CommandLine const& cli() const { + return m_cli; + } + std::vector const& unusedTokens() const { + return m_unusedTokens; + } + ConfigData& configData() { + return m_configData; + } + Config& config() { + if( !m_config ) + m_config = new Config( m_configData ); + return *m_config; + } + private: + Clara::CommandLine m_cli; + std::vector m_unusedTokens; + ConfigData m_configData; + Ptr m_config; + }; + + bool Session::alreadyInstantiated = false; + +} // end namespace Catch + +// #included from: catch_registry_hub.hpp +#define TWOBLUECUBES_CATCH_REGISTRY_HUB_HPP_INCLUDED + +// #included from: catch_test_case_registry_impl.hpp +#define TWOBLUECUBES_CATCH_TEST_CASE_REGISTRY_IMPL_HPP_INCLUDED + +#include +#include +#include +#include + +namespace Catch { + + struct RandomNumberGenerator { + typedef std::ptrdiff_t result_type; + + result_type operator()( result_type n ) const { return std::rand() % n; } + +#ifdef CATCH_CONFIG_CPP11_SHUFFLE + static constexpr result_type min() { return 0; } + static constexpr result_type max() { return 1000000; } + result_type operator()() const { return std::rand() % max(); } +#endif + template + static void shuffle( V& vector ) { + RandomNumberGenerator rng; +#ifdef CATCH_CONFIG_CPP11_SHUFFLE + std::shuffle( vector.begin(), vector.end(), rng ); +#else + std::random_shuffle( vector.begin(), vector.end(), rng ); +#endif + } + }; + + inline std::vector sortTests( IConfig const& config, std::vector const& unsortedTestCases ) { + + std::vector sorted = unsortedTestCases; + + switch( config.runOrder() ) { + case RunTests::InLexicographicalOrder: + std::sort( sorted.begin(), sorted.end() ); + break; + case RunTests::InRandomOrder: + { + seedRng( config ); + RandomNumberGenerator::shuffle( sorted ); + } + break; + case RunTests::InDeclarationOrder: + // already in declaration order + break; + } + return sorted; + } + bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) { + return testSpec.matches( testCase ) && ( config.allowThrows() || !testCase.throws() ); + } + + void enforceNoDuplicateTestCases( std::vector const& functions ) { + std::set seenFunctions; + for( std::vector::const_iterator it = functions.begin(), itEnd = functions.end(); + it != itEnd; + ++it ) { + std::pair::const_iterator, bool> prev = seenFunctions.insert( *it ); + if( !prev.second ) { + std::ostringstream ss; + + ss << Colour( Colour::Red ) + << "error: TEST_CASE( \"" << it->name << "\" ) already defined.\n" + << "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << '\n' + << "\tRedefined at " << it->getTestCaseInfo().lineInfo << std::endl; + + throw std::runtime_error(ss.str()); + } + } + } + + std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ) { + std::vector filtered; + filtered.reserve( testCases.size() ); + for( std::vector::const_iterator it = testCases.begin(), itEnd = testCases.end(); + it != itEnd; + ++it ) + if( matchTest( *it, testSpec, config ) ) + filtered.push_back( *it ); + return filtered; + } + std::vector const& getAllTestCasesSorted( IConfig const& config ) { + return getRegistryHub().getTestCaseRegistry().getAllTestsSorted( config ); + } + + class TestRegistry : public ITestCaseRegistry { + public: + TestRegistry() + : m_currentSortOrder( RunTests::InDeclarationOrder ), + m_unnamedCount( 0 ) + {} + virtual ~TestRegistry(); + + virtual void registerTest( TestCase const& testCase ) { + std::string name = testCase.getTestCaseInfo().name; + if( name.empty() ) { + std::ostringstream oss; + oss << "Anonymous test case " << ++m_unnamedCount; + return registerTest( testCase.withName( oss.str() ) ); + } + m_functions.push_back( testCase ); + } + + virtual std::vector const& getAllTests() const { + return m_functions; + } + virtual std::vector const& getAllTestsSorted( IConfig const& config ) const { + if( m_sortedFunctions.empty() ) + enforceNoDuplicateTestCases( m_functions ); + + if( m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) { + m_sortedFunctions = sortTests( config, m_functions ); + m_currentSortOrder = config.runOrder(); + } + return m_sortedFunctions; + } + + private: + std::vector m_functions; + mutable RunTests::InWhatOrder m_currentSortOrder; + mutable std::vector m_sortedFunctions; + size_t m_unnamedCount; + std::ios_base::Init m_ostreamInit; // Forces cout/ cerr to be initialised + }; + + /////////////////////////////////////////////////////////////////////////// + + class FreeFunctionTestCase : public SharedImpl { + public: + + FreeFunctionTestCase( TestFunction fun ) : m_fun( fun ) {} + + virtual void invoke() const { + m_fun(); + } + + private: + virtual ~FreeFunctionTestCase(); + + TestFunction m_fun; + }; + + inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) { + std::string className = classOrQualifiedMethodName; + if( startsWith( className, '&' ) ) + { + std::size_t lastColons = className.rfind( "::" ); + std::size_t penultimateColons = className.rfind( "::", lastColons-1 ); + if( penultimateColons == std::string::npos ) + penultimateColons = 1; + className = className.substr( penultimateColons, lastColons-penultimateColons ); + } + return className; + } + + void registerTestCase + ( ITestCase* testCase, + char const* classOrQualifiedMethodName, + NameAndDesc const& nameAndDesc, + SourceLineInfo const& lineInfo ) { + + getMutableRegistryHub().registerTest + ( makeTestCase + ( testCase, + extractClassName( classOrQualifiedMethodName ), + nameAndDesc.name, + nameAndDesc.description, + lineInfo ) ); + } + void registerTestCaseFunction + ( TestFunction function, + SourceLineInfo const& lineInfo, + NameAndDesc const& nameAndDesc ) { + registerTestCase( new FreeFunctionTestCase( function ), "", nameAndDesc, lineInfo ); + } + + /////////////////////////////////////////////////////////////////////////// + + AutoReg::AutoReg + ( TestFunction function, + SourceLineInfo const& lineInfo, + NameAndDesc const& nameAndDesc ) { + registerTestCaseFunction( function, lineInfo, nameAndDesc ); + } + + AutoReg::~AutoReg() {} + +} // end namespace Catch + +// #included from: catch_reporter_registry.hpp +#define TWOBLUECUBES_CATCH_REPORTER_REGISTRY_HPP_INCLUDED + +#include + +namespace Catch { + + class ReporterRegistry : public IReporterRegistry { + + public: + + virtual ~ReporterRegistry() CATCH_OVERRIDE {} + + virtual IStreamingReporter* create( std::string const& name, Ptr const& config ) const CATCH_OVERRIDE { + FactoryMap::const_iterator it = m_factories.find( name ); + if( it == m_factories.end() ) + return CATCH_NULL; + return it->second->create( ReporterConfig( config ) ); + } + + void registerReporter( std::string const& name, Ptr const& factory ) { + m_factories.insert( std::make_pair( name, factory ) ); + } + void registerListener( Ptr const& factory ) { + m_listeners.push_back( factory ); + } + + virtual FactoryMap const& getFactories() const CATCH_OVERRIDE { + return m_factories; + } + virtual Listeners const& getListeners() const CATCH_OVERRIDE { + return m_listeners; + } + + private: + FactoryMap m_factories; + Listeners m_listeners; + }; +} + +// #included from: catch_exception_translator_registry.hpp +#define TWOBLUECUBES_CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED + +#ifdef __OBJC__ +#import "Foundation/Foundation.h" +#endif + +namespace Catch { + + class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry { + public: + ~ExceptionTranslatorRegistry() { + deleteAll( m_translators ); + } + + virtual void registerTranslator( const IExceptionTranslator* translator ) { + m_translators.push_back( translator ); + } + + virtual std::string translateActiveException() const { + try { +#ifdef __OBJC__ + // In Objective-C try objective-c exceptions first + @try { + return tryTranslators(); + } + @catch (NSException *exception) { + return Catch::toString( [exception description] ); + } +#else + return tryTranslators(); +#endif + } + catch( TestFailureException& ) { + throw; + } + catch( std::exception& ex ) { + return ex.what(); + } + catch( std::string& msg ) { + return msg; + } + catch( const char* msg ) { + return msg; + } + catch(...) { + return "Unknown exception"; + } + } + + std::string tryTranslators() const { + if( m_translators.empty() ) + throw; + else + return m_translators[0]->translate( m_translators.begin()+1, m_translators.end() ); + } + + private: + std::vector m_translators; + }; +} + +// #included from: catch_tag_alias_registry.h +#define TWOBLUECUBES_CATCH_TAG_ALIAS_REGISTRY_H_INCLUDED + +#include + +namespace Catch { + + class TagAliasRegistry : public ITagAliasRegistry { + public: + virtual ~TagAliasRegistry(); + virtual Option find( std::string const& alias ) const; + virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const; + void add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ); + + private: + std::map m_registry; + }; + +} // end namespace Catch + +namespace Catch { + + namespace { + + class RegistryHub : public IRegistryHub, public IMutableRegistryHub { + + RegistryHub( RegistryHub const& ); + void operator=( RegistryHub const& ); + + public: // IRegistryHub + RegistryHub() { + } + virtual IReporterRegistry const& getReporterRegistry() const CATCH_OVERRIDE { + return m_reporterRegistry; + } + virtual ITestCaseRegistry const& getTestCaseRegistry() const CATCH_OVERRIDE { + return m_testCaseRegistry; + } + virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() CATCH_OVERRIDE { + return m_exceptionTranslatorRegistry; + } + virtual ITagAliasRegistry const& getTagAliasRegistry() const CATCH_OVERRIDE { + return m_tagAliasRegistry; + } + + public: // IMutableRegistryHub + virtual void registerReporter( std::string const& name, Ptr const& factory ) CATCH_OVERRIDE { + m_reporterRegistry.registerReporter( name, factory ); + } + virtual void registerListener( Ptr const& factory ) CATCH_OVERRIDE { + m_reporterRegistry.registerListener( factory ); + } + virtual void registerTest( TestCase const& testInfo ) CATCH_OVERRIDE { + m_testCaseRegistry.registerTest( testInfo ); + } + virtual void registerTranslator( const IExceptionTranslator* translator ) CATCH_OVERRIDE { + m_exceptionTranslatorRegistry.registerTranslator( translator ); + } + virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) CATCH_OVERRIDE { + m_tagAliasRegistry.add( alias, tag, lineInfo ); + } + + private: + TestRegistry m_testCaseRegistry; + ReporterRegistry m_reporterRegistry; + ExceptionTranslatorRegistry m_exceptionTranslatorRegistry; + TagAliasRegistry m_tagAliasRegistry; + }; + + // Single, global, instance + inline RegistryHub*& getTheRegistryHub() { + static RegistryHub* theRegistryHub = CATCH_NULL; + if( !theRegistryHub ) + theRegistryHub = new RegistryHub(); + return theRegistryHub; + } + } + + IRegistryHub& getRegistryHub() { + return *getTheRegistryHub(); + } + IMutableRegistryHub& getMutableRegistryHub() { + return *getTheRegistryHub(); + } + void cleanUp() { + delete getTheRegistryHub(); + getTheRegistryHub() = CATCH_NULL; + cleanUpContext(); + } + std::string translateActiveException() { + return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException(); + } + +} // end namespace Catch + +// #included from: catch_notimplemented_exception.hpp +#define TWOBLUECUBES_CATCH_NOTIMPLEMENTED_EXCEPTION_HPP_INCLUDED + +#include + +namespace Catch { + + NotImplementedException::NotImplementedException( SourceLineInfo const& lineInfo ) + : m_lineInfo( lineInfo ) { + std::ostringstream oss; + oss << lineInfo << ": function "; + oss << "not implemented"; + m_what = oss.str(); + } + + const char* NotImplementedException::what() const CATCH_NOEXCEPT { + return m_what.c_str(); + } + +} // end namespace Catch + +// #included from: catch_context_impl.hpp +#define TWOBLUECUBES_CATCH_CONTEXT_IMPL_HPP_INCLUDED + +// #included from: catch_stream.hpp +#define TWOBLUECUBES_CATCH_STREAM_HPP_INCLUDED + +#include +#include +#include + +namespace Catch { + + template + class StreamBufImpl : public StreamBufBase { + char data[bufferSize]; + WriterF m_writer; + + public: + StreamBufImpl() { + setp( data, data + sizeof(data) ); + } + + ~StreamBufImpl() CATCH_NOEXCEPT { + sync(); + } + + private: + int overflow( int c ) { + sync(); + + if( c != EOF ) { + if( pbase() == epptr() ) + m_writer( std::string( 1, static_cast( c ) ) ); + else + sputc( static_cast( c ) ); + } + return 0; + } + + int sync() { + if( pbase() != pptr() ) { + m_writer( std::string( pbase(), static_cast( pptr() - pbase() ) ) ); + setp( pbase(), epptr() ); + } + return 0; + } + }; + + /////////////////////////////////////////////////////////////////////////// + + FileStream::FileStream( std::string const& filename ) { + m_ofs.open( filename.c_str() ); + if( m_ofs.fail() ) { + std::ostringstream oss; + oss << "Unable to open file: '" << filename << '\''; + throw std::domain_error( oss.str() ); + } + } + + std::ostream& FileStream::stream() const { + return m_ofs; + } + + struct OutputDebugWriter { + + void operator()( std::string const&str ) { + writeToDebugConsole( str ); + } + }; + + DebugOutStream::DebugOutStream() + : m_streamBuf( new StreamBufImpl() ), + m_os( m_streamBuf.get() ) + {} + + std::ostream& DebugOutStream::stream() const { + return m_os; + } + + // Store the streambuf from cout up-front because + // cout may get redirected when running tests + CoutStream::CoutStream() + : m_os( Catch::cout().rdbuf() ) + {} + + std::ostream& CoutStream::stream() const { + return m_os; + } + +#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions + std::ostream& cout() { + return std::cout; + } + std::ostream& cerr() { + return std::cerr; + } + std::ostream& clog() { + return std::clog; + } +#endif +} + +namespace Catch { + + class Context : public IMutableContext { + + Context() : m_config( CATCH_NULL ), m_runner( CATCH_NULL ), m_resultCapture( CATCH_NULL ) {} + Context( Context const& ); + void operator=( Context const& ); + + public: + virtual ~Context() { + deleteAllValues( m_generatorsByTestName ); + } + + public: // IContext + virtual IResultCapture* getResultCapture() { + return m_resultCapture; + } + virtual IRunner* getRunner() { + return m_runner; + } + virtual size_t getGeneratorIndex( std::string const& fileInfo, size_t totalSize ) { + return getGeneratorsForCurrentTest() + .getGeneratorInfo( fileInfo, totalSize ) + .getCurrentIndex(); + } + virtual bool advanceGeneratorsForCurrentTest() { + IGeneratorsForTest* generators = findGeneratorsForCurrentTest(); + return generators && generators->moveNext(); + } + + virtual Ptr getConfig() const { + return m_config; + } + + public: // IMutableContext + virtual void setResultCapture( IResultCapture* resultCapture ) { + m_resultCapture = resultCapture; + } + virtual void setRunner( IRunner* runner ) { + m_runner = runner; + } + virtual void setConfig( Ptr const& config ) { + m_config = config; + } + + friend IMutableContext& getCurrentMutableContext(); + + private: + IGeneratorsForTest* findGeneratorsForCurrentTest() { + std::string testName = getResultCapture()->getCurrentTestName(); + + std::map::const_iterator it = + m_generatorsByTestName.find( testName ); + return it != m_generatorsByTestName.end() + ? it->second + : CATCH_NULL; + } + + IGeneratorsForTest& getGeneratorsForCurrentTest() { + IGeneratorsForTest* generators = findGeneratorsForCurrentTest(); + if( !generators ) { + std::string testName = getResultCapture()->getCurrentTestName(); + generators = createGeneratorsForTest(); + m_generatorsByTestName.insert( std::make_pair( testName, generators ) ); + } + return *generators; + } + + private: + Ptr m_config; + IRunner* m_runner; + IResultCapture* m_resultCapture; + std::map m_generatorsByTestName; + }; + + namespace { + Context* currentContext = CATCH_NULL; + } + IMutableContext& getCurrentMutableContext() { + if( !currentContext ) + currentContext = new Context(); + return *currentContext; + } + IContext& getCurrentContext() { + return getCurrentMutableContext(); + } + + void cleanUpContext() { + delete currentContext; + currentContext = CATCH_NULL; + } +} + +// #included from: catch_console_colour_impl.hpp +#define TWOBLUECUBES_CATCH_CONSOLE_COLOUR_IMPL_HPP_INCLUDED + +// #included from: catch_errno_guard.hpp +#define TWOBLUECUBES_CATCH_ERRNO_GUARD_HPP_INCLUDED + +#include + +namespace Catch { + + class ErrnoGuard { + public: + ErrnoGuard():m_oldErrno(errno){} + ~ErrnoGuard() { errno = m_oldErrno; } + private: + int m_oldErrno; + }; + +} + +namespace Catch { + namespace { + + struct IColourImpl { + virtual ~IColourImpl() {} + virtual void use( Colour::Code _colourCode ) = 0; + }; + + struct NoColourImpl : IColourImpl { + void use( Colour::Code ) {} + + static IColourImpl* instance() { + static NoColourImpl s_instance; + return &s_instance; + } + }; + + } // anon namespace +} // namespace Catch + +#if !defined( CATCH_CONFIG_COLOUR_NONE ) && !defined( CATCH_CONFIG_COLOUR_WINDOWS ) && !defined( CATCH_CONFIG_COLOUR_ANSI ) +# ifdef CATCH_PLATFORM_WINDOWS +# define CATCH_CONFIG_COLOUR_WINDOWS +# else +# define CATCH_CONFIG_COLOUR_ANSI +# endif +#endif + +#if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) ///////////////////////////////////////// + +namespace Catch { +namespace { + + class Win32ColourImpl : public IColourImpl { + public: + Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) ) + { + CONSOLE_SCREEN_BUFFER_INFO csbiInfo; + GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo ); + originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY ); + originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY ); + } + + virtual void use( Colour::Code _colourCode ) { + switch( _colourCode ) { + case Colour::None: return setTextAttribute( originalForegroundAttributes ); + case Colour::White: return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); + case Colour::Red: return setTextAttribute( FOREGROUND_RED ); + case Colour::Green: return setTextAttribute( FOREGROUND_GREEN ); + case Colour::Blue: return setTextAttribute( FOREGROUND_BLUE ); + case Colour::Cyan: return setTextAttribute( FOREGROUND_BLUE | FOREGROUND_GREEN ); + case Colour::Yellow: return setTextAttribute( FOREGROUND_RED | FOREGROUND_GREEN ); + case Colour::Grey: return setTextAttribute( 0 ); + + case Colour::LightGrey: return setTextAttribute( FOREGROUND_INTENSITY ); + case Colour::BrightRed: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED ); + case Colour::BrightGreen: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN ); + case Colour::BrightWhite: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); + + case Colour::Bright: throw std::logic_error( "not a colour" ); + } + } + + private: + void setTextAttribute( WORD _textAttribute ) { + SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes ); + } + HANDLE stdoutHandle; + WORD originalForegroundAttributes; + WORD originalBackgroundAttributes; + }; + + IColourImpl* platformColourInstance() { + static Win32ColourImpl s_instance; + + Ptr config = getCurrentContext().getConfig(); + UseColour::YesOrNo colourMode = config + ? config->useColour() + : UseColour::Auto; + if( colourMode == UseColour::Auto ) + colourMode = !isDebuggerActive() + ? UseColour::Yes + : UseColour::No; + return colourMode == UseColour::Yes + ? &s_instance + : NoColourImpl::instance(); + } + +} // end anon namespace +} // end namespace Catch + +#elif defined( CATCH_CONFIG_COLOUR_ANSI ) ////////////////////////////////////// + +#include + +namespace Catch { +namespace { + + // use POSIX/ ANSI console terminal codes + // Thanks to Adam Strzelecki for original contribution + // (http://github.com/nanoant) + // https://github.com/philsquared/Catch/pull/131 + class PosixColourImpl : public IColourImpl { + public: + virtual void use( Colour::Code _colourCode ) { + switch( _colourCode ) { + case Colour::None: + case Colour::White: return setColour( "[0m" ); + case Colour::Red: return setColour( "[0;31m" ); + case Colour::Green: return setColour( "[0;32m" ); + case Colour::Blue: return setColour( "[0;34m" ); + case Colour::Cyan: return setColour( "[0;36m" ); + case Colour::Yellow: return setColour( "[0;33m" ); + case Colour::Grey: return setColour( "[1;30m" ); + + case Colour::LightGrey: return setColour( "[0;37m" ); + case Colour::BrightRed: return setColour( "[1;31m" ); + case Colour::BrightGreen: return setColour( "[1;32m" ); + case Colour::BrightWhite: return setColour( "[1;37m" ); + + case Colour::Bright: throw std::logic_error( "not a colour" ); + } + } + static IColourImpl* instance() { + static PosixColourImpl s_instance; + return &s_instance; + } + + private: + void setColour( const char* _escapeCode ) { + Catch::cout() << '\033' << _escapeCode; + } + }; + + IColourImpl* platformColourInstance() { + ErrnoGuard guard; + Ptr config = getCurrentContext().getConfig(); + UseColour::YesOrNo colourMode = config + ? config->useColour() + : UseColour::Auto; + if( colourMode == UseColour::Auto ) + colourMode = (!isDebuggerActive() && isatty(STDOUT_FILENO) ) + ? UseColour::Yes + : UseColour::No; + return colourMode == UseColour::Yes + ? PosixColourImpl::instance() + : NoColourImpl::instance(); + } + +} // end anon namespace +} // end namespace Catch + +#else // not Windows or ANSI /////////////////////////////////////////////// + +namespace Catch { + + static IColourImpl* platformColourInstance() { return NoColourImpl::instance(); } + +} // end namespace Catch + +#endif // Windows/ ANSI/ None + +namespace Catch { + + Colour::Colour( Code _colourCode ) : m_moved( false ) { use( _colourCode ); } + Colour::Colour( Colour const& _other ) : m_moved( false ) { const_cast( _other ).m_moved = true; } + Colour::~Colour(){ if( !m_moved ) use( None ); } + + void Colour::use( Code _colourCode ) { + static IColourImpl* impl = platformColourInstance(); + impl->use( _colourCode ); + } + +} // end namespace Catch + +// #included from: catch_generators_impl.hpp +#define TWOBLUECUBES_CATCH_GENERATORS_IMPL_HPP_INCLUDED + +#include +#include +#include + +namespace Catch { + + struct GeneratorInfo : IGeneratorInfo { + + GeneratorInfo( std::size_t size ) + : m_size( size ), + m_currentIndex( 0 ) + {} + + bool moveNext() { + if( ++m_currentIndex == m_size ) { + m_currentIndex = 0; + return false; + } + return true; + } + + std::size_t getCurrentIndex() const { + return m_currentIndex; + } + + std::size_t m_size; + std::size_t m_currentIndex; + }; + + /////////////////////////////////////////////////////////////////////////// + + class GeneratorsForTest : public IGeneratorsForTest { + + public: + ~GeneratorsForTest() { + deleteAll( m_generatorsInOrder ); + } + + IGeneratorInfo& getGeneratorInfo( std::string const& fileInfo, std::size_t size ) { + std::map::const_iterator it = m_generatorsByName.find( fileInfo ); + if( it == m_generatorsByName.end() ) { + IGeneratorInfo* info = new GeneratorInfo( size ); + m_generatorsByName.insert( std::make_pair( fileInfo, info ) ); + m_generatorsInOrder.push_back( info ); + return *info; + } + return *it->second; + } + + bool moveNext() { + std::vector::const_iterator it = m_generatorsInOrder.begin(); + std::vector::const_iterator itEnd = m_generatorsInOrder.end(); + for(; it != itEnd; ++it ) { + if( (*it)->moveNext() ) + return true; + } + return false; + } + + private: + std::map m_generatorsByName; + std::vector m_generatorsInOrder; + }; + + IGeneratorsForTest* createGeneratorsForTest() + { + return new GeneratorsForTest(); + } + +} // end namespace Catch + +// #included from: catch_assertionresult.hpp +#define TWOBLUECUBES_CATCH_ASSERTIONRESULT_HPP_INCLUDED + +namespace Catch { + + AssertionInfo::AssertionInfo():macroName(""), capturedExpression(""), resultDisposition(ResultDisposition::Normal), secondArg(""){} + + AssertionInfo::AssertionInfo( char const * _macroName, + SourceLineInfo const& _lineInfo, + char const * _capturedExpression, + ResultDisposition::Flags _resultDisposition, + char const * _secondArg) + : macroName( _macroName ), + lineInfo( _lineInfo ), + capturedExpression( _capturedExpression ), + resultDisposition( _resultDisposition ), + secondArg( _secondArg ) + {} + + AssertionResult::AssertionResult() {} + + AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data ) + : m_info( info ), + m_resultData( data ) + {} + + AssertionResult::~AssertionResult() {} + + // Result was a success + bool AssertionResult::succeeded() const { + return Catch::isOk( m_resultData.resultType ); + } + + // Result was a success, or failure is suppressed + bool AssertionResult::isOk() const { + return Catch::isOk( m_resultData.resultType ) || shouldSuppressFailure( m_info.resultDisposition ); + } + + ResultWas::OfType AssertionResult::getResultType() const { + return m_resultData.resultType; + } + + bool AssertionResult::hasExpression() const { + return m_info.capturedExpression[0] != 0; + } + + bool AssertionResult::hasMessage() const { + return !m_resultData.message.empty(); + } + + std::string capturedExpressionWithSecondArgument( char const * capturedExpression, char const * secondArg ) { + return (secondArg[0] == 0 || secondArg[0] == '"' && secondArg[1] == '"') + ? capturedExpression + : std::string(capturedExpression) + ", " + secondArg; + } + + std::string AssertionResult::getExpression() const { + if( isFalseTest( m_info.resultDisposition ) ) + return '!' + capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg); + else + return capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg); + } + std::string AssertionResult::getExpressionInMacro() const { + if( m_info.macroName[0] == 0 ) + return capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg); + else + return std::string(m_info.macroName) + "( " + capturedExpressionWithSecondArgument(m_info.capturedExpression, m_info.secondArg) + " )"; + } + + bool AssertionResult::hasExpandedExpression() const { + return hasExpression() && getExpandedExpression() != getExpression(); + } + + std::string AssertionResult::getExpandedExpression() const { + return m_resultData.reconstructExpression(); + } + + std::string AssertionResult::getMessage() const { + return m_resultData.message; + } + SourceLineInfo AssertionResult::getSourceInfo() const { + return m_info.lineInfo; + } + + std::string AssertionResult::getTestMacroName() const { + return m_info.macroName; + } + + void AssertionResult::discardDecomposedExpression() const { + m_resultData.decomposedExpression = CATCH_NULL; + } + + void AssertionResult::expandDecomposedExpression() const { + m_resultData.reconstructExpression(); + } + +} // end namespace Catch + +// #included from: catch_test_case_info.hpp +#define TWOBLUECUBES_CATCH_TEST_CASE_INFO_HPP_INCLUDED + +#include + +namespace Catch { + + inline TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) { + if( startsWith( tag, '.' ) || + tag == "hide" || + tag == "!hide" ) + return TestCaseInfo::IsHidden; + else if( tag == "!throws" ) + return TestCaseInfo::Throws; + else if( tag == "!shouldfail" ) + return TestCaseInfo::ShouldFail; + else if( tag == "!mayfail" ) + return TestCaseInfo::MayFail; + else if( tag == "!nonportable" ) + return TestCaseInfo::NonPortable; + else + return TestCaseInfo::None; + } + inline bool isReservedTag( std::string const& tag ) { + return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( tag[0] ); + } + inline void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) { + if( isReservedTag( tag ) ) { + std::ostringstream ss; + ss << Colour(Colour::Red) + << "Tag name [" << tag << "] not allowed.\n" + << "Tag names starting with non alpha-numeric characters are reserved\n" + << Colour(Colour::FileName) + << _lineInfo << '\n'; + throw std::runtime_error(ss.str()); + } + } + + TestCase makeTestCase( ITestCase* _testCase, + std::string const& _className, + std::string const& _name, + std::string const& _descOrTags, + SourceLineInfo const& _lineInfo ) + { + bool isHidden( startsWith( _name, "./" ) ); // Legacy support + + // Parse out tags + std::set tags; + std::string desc, tag; + bool inTag = false; + for( std::size_t i = 0; i < _descOrTags.size(); ++i ) { + char c = _descOrTags[i]; + if( !inTag ) { + if( c == '[' ) + inTag = true; + else + desc += c; + } + else { + if( c == ']' ) { + TestCaseInfo::SpecialProperties prop = parseSpecialTag( tag ); + if( prop == TestCaseInfo::IsHidden ) + isHidden = true; + else if( prop == TestCaseInfo::None ) + enforceNotReservedTag( tag, _lineInfo ); + + tags.insert( tag ); + tag.clear(); + inTag = false; + } + else + tag += c; + } + } + if( isHidden ) { + tags.insert( "hide" ); + tags.insert( "." ); + } + + TestCaseInfo info( _name, _className, desc, tags, _lineInfo ); + return TestCase( _testCase, info ); + } + + void setTags( TestCaseInfo& testCaseInfo, std::set const& tags ) + { + testCaseInfo.tags = tags; + testCaseInfo.lcaseTags.clear(); + + std::ostringstream oss; + for( std::set::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it ) { + oss << '[' << *it << ']'; + std::string lcaseTag = toLower( *it ); + testCaseInfo.properties = static_cast( testCaseInfo.properties | parseSpecialTag( lcaseTag ) ); + testCaseInfo.lcaseTags.insert( lcaseTag ); + } + testCaseInfo.tagsAsString = oss.str(); + } + + TestCaseInfo::TestCaseInfo( std::string const& _name, + std::string const& _className, + std::string const& _description, + std::set const& _tags, + SourceLineInfo const& _lineInfo ) + : name( _name ), + className( _className ), + description( _description ), + lineInfo( _lineInfo ), + properties( None ) + { + setTags( *this, _tags ); + } + + TestCaseInfo::TestCaseInfo( TestCaseInfo const& other ) + : name( other.name ), + className( other.className ), + description( other.description ), + tags( other.tags ), + lcaseTags( other.lcaseTags ), + tagsAsString( other.tagsAsString ), + lineInfo( other.lineInfo ), + properties( other.properties ) + {} + + bool TestCaseInfo::isHidden() const { + return ( properties & IsHidden ) != 0; + } + bool TestCaseInfo::throws() const { + return ( properties & Throws ) != 0; + } + bool TestCaseInfo::okToFail() const { + return ( properties & (ShouldFail | MayFail ) ) != 0; + } + bool TestCaseInfo::expectedToFail() const { + return ( properties & (ShouldFail ) ) != 0; + } + + TestCase::TestCase( ITestCase* testCase, TestCaseInfo const& info ) : TestCaseInfo( info ), test( testCase ) {} + + TestCase::TestCase( TestCase const& other ) + : TestCaseInfo( other ), + test( other.test ) + {} + + TestCase TestCase::withName( std::string const& _newName ) const { + TestCase other( *this ); + other.name = _newName; + return other; + } + + void TestCase::swap( TestCase& other ) { + test.swap( other.test ); + name.swap( other.name ); + className.swap( other.className ); + description.swap( other.description ); + tags.swap( other.tags ); + lcaseTags.swap( other.lcaseTags ); + tagsAsString.swap( other.tagsAsString ); + std::swap( TestCaseInfo::properties, static_cast( other ).properties ); + std::swap( lineInfo, other.lineInfo ); + } + + void TestCase::invoke() const { + test->invoke(); + } + + bool TestCase::operator == ( TestCase const& other ) const { + return test.get() == other.test.get() && + name == other.name && + className == other.className; + } + + bool TestCase::operator < ( TestCase const& other ) const { + return name < other.name; + } + TestCase& TestCase::operator = ( TestCase const& other ) { + TestCase temp( other ); + swap( temp ); + return *this; + } + + TestCaseInfo const& TestCase::getTestCaseInfo() const + { + return *this; + } + +} // end namespace Catch + +// #included from: catch_version.hpp +#define TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED + +namespace Catch { + + Version::Version + ( unsigned int _majorVersion, + unsigned int _minorVersion, + unsigned int _patchNumber, + char const * const _branchName, + unsigned int _buildNumber ) + : majorVersion( _majorVersion ), + minorVersion( _minorVersion ), + patchNumber( _patchNumber ), + branchName( _branchName ), + buildNumber( _buildNumber ) + {} + + std::ostream& operator << ( std::ostream& os, Version const& version ) { + os << version.majorVersion << '.' + << version.minorVersion << '.' + << version.patchNumber; + // branchName is never null -> 0th char is \0 if it is empty + if (version.branchName[0]) { + os << '-' << version.branchName + << '.' << version.buildNumber; + } + return os; + } + + inline Version libraryVersion() { + static Version version( 1, 9, 7, "", 0 ); + return version; + } + +} + +// #included from: catch_message.hpp +#define TWOBLUECUBES_CATCH_MESSAGE_HPP_INCLUDED + +namespace Catch { + + MessageInfo::MessageInfo( std::string const& _macroName, + SourceLineInfo const& _lineInfo, + ResultWas::OfType _type ) + : macroName( _macroName ), + lineInfo( _lineInfo ), + type( _type ), + sequence( ++globalCount ) + {} + + // This may need protecting if threading support is added + unsigned int MessageInfo::globalCount = 0; + + //////////////////////////////////////////////////////////////////////////// + + ScopedMessage::ScopedMessage( MessageBuilder const& builder ) + : m_info( builder.m_info ) + { + m_info.message = builder.m_stream.str(); + getResultCapture().pushScopedMessage( m_info ); + } + ScopedMessage::ScopedMessage( ScopedMessage const& other ) + : m_info( other.m_info ) + {} + + ScopedMessage::~ScopedMessage() { + if ( !std::uncaught_exception() ){ + getResultCapture().popScopedMessage(m_info); + } + } + +} // end namespace Catch + +// #included from: catch_legacy_reporter_adapter.hpp +#define TWOBLUECUBES_CATCH_LEGACY_REPORTER_ADAPTER_HPP_INCLUDED + +// #included from: catch_legacy_reporter_adapter.h +#define TWOBLUECUBES_CATCH_LEGACY_REPORTER_ADAPTER_H_INCLUDED + +namespace Catch +{ + // Deprecated + struct IReporter : IShared { + virtual ~IReporter(); + + virtual bool shouldRedirectStdout() const = 0; + + virtual void StartTesting() = 0; + virtual void EndTesting( Totals const& totals ) = 0; + virtual void StartGroup( std::string const& groupName ) = 0; + virtual void EndGroup( std::string const& groupName, Totals const& totals ) = 0; + virtual void StartTestCase( TestCaseInfo const& testInfo ) = 0; + virtual void EndTestCase( TestCaseInfo const& testInfo, Totals const& totals, std::string const& stdOut, std::string const& stdErr ) = 0; + virtual void StartSection( std::string const& sectionName, std::string const& description ) = 0; + virtual void EndSection( std::string const& sectionName, Counts const& assertions ) = 0; + virtual void NoAssertionsInSection( std::string const& sectionName ) = 0; + virtual void NoAssertionsInTestCase( std::string const& testName ) = 0; + virtual void Aborted() = 0; + virtual void Result( AssertionResult const& result ) = 0; + }; + + class LegacyReporterAdapter : public SharedImpl + { + public: + LegacyReporterAdapter( Ptr const& legacyReporter ); + virtual ~LegacyReporterAdapter(); + + virtual ReporterPreferences getPreferences() const; + virtual void noMatchingTestCases( std::string const& ); + virtual void testRunStarting( TestRunInfo const& ); + virtual void testGroupStarting( GroupInfo const& groupInfo ); + virtual void testCaseStarting( TestCaseInfo const& testInfo ); + virtual void sectionStarting( SectionInfo const& sectionInfo ); + virtual void assertionStarting( AssertionInfo const& ); + virtual bool assertionEnded( AssertionStats const& assertionStats ); + virtual void sectionEnded( SectionStats const& sectionStats ); + virtual void testCaseEnded( TestCaseStats const& testCaseStats ); + virtual void testGroupEnded( TestGroupStats const& testGroupStats ); + virtual void testRunEnded( TestRunStats const& testRunStats ); + virtual void skipTest( TestCaseInfo const& ); + + private: + Ptr m_legacyReporter; + }; +} + +namespace Catch +{ + LegacyReporterAdapter::LegacyReporterAdapter( Ptr const& legacyReporter ) + : m_legacyReporter( legacyReporter ) + {} + LegacyReporterAdapter::~LegacyReporterAdapter() {} + + ReporterPreferences LegacyReporterAdapter::getPreferences() const { + ReporterPreferences prefs; + prefs.shouldRedirectStdOut = m_legacyReporter->shouldRedirectStdout(); + return prefs; + } + + void LegacyReporterAdapter::noMatchingTestCases( std::string const& ) {} + void LegacyReporterAdapter::testRunStarting( TestRunInfo const& ) { + m_legacyReporter->StartTesting(); + } + void LegacyReporterAdapter::testGroupStarting( GroupInfo const& groupInfo ) { + m_legacyReporter->StartGroup( groupInfo.name ); + } + void LegacyReporterAdapter::testCaseStarting( TestCaseInfo const& testInfo ) { + m_legacyReporter->StartTestCase( testInfo ); + } + void LegacyReporterAdapter::sectionStarting( SectionInfo const& sectionInfo ) { + m_legacyReporter->StartSection( sectionInfo.name, sectionInfo.description ); + } + void LegacyReporterAdapter::assertionStarting( AssertionInfo const& ) { + // Not on legacy interface + } + + bool LegacyReporterAdapter::assertionEnded( AssertionStats const& assertionStats ) { + if( assertionStats.assertionResult.getResultType() != ResultWas::Ok ) { + for( std::vector::const_iterator it = assertionStats.infoMessages.begin(), itEnd = assertionStats.infoMessages.end(); + it != itEnd; + ++it ) { + if( it->type == ResultWas::Info ) { + ResultBuilder rb( it->macroName.c_str(), it->lineInfo, "", ResultDisposition::Normal ); + rb << it->message; + rb.setResultType( ResultWas::Info ); + AssertionResult result = rb.build(); + m_legacyReporter->Result( result ); + } + } + } + m_legacyReporter->Result( assertionStats.assertionResult ); + return true; + } + void LegacyReporterAdapter::sectionEnded( SectionStats const& sectionStats ) { + if( sectionStats.missingAssertions ) + m_legacyReporter->NoAssertionsInSection( sectionStats.sectionInfo.name ); + m_legacyReporter->EndSection( sectionStats.sectionInfo.name, sectionStats.assertions ); + } + void LegacyReporterAdapter::testCaseEnded( TestCaseStats const& testCaseStats ) { + m_legacyReporter->EndTestCase + ( testCaseStats.testInfo, + testCaseStats.totals, + testCaseStats.stdOut, + testCaseStats.stdErr ); + } + void LegacyReporterAdapter::testGroupEnded( TestGroupStats const& testGroupStats ) { + if( testGroupStats.aborting ) + m_legacyReporter->Aborted(); + m_legacyReporter->EndGroup( testGroupStats.groupInfo.name, testGroupStats.totals ); + } + void LegacyReporterAdapter::testRunEnded( TestRunStats const& testRunStats ) { + m_legacyReporter->EndTesting( testRunStats.totals ); + } + void LegacyReporterAdapter::skipTest( TestCaseInfo const& ) { + } +} + +// #included from: catch_timer.hpp + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wc++11-long-long" +#endif + +#ifdef CATCH_PLATFORM_WINDOWS + +#else + +#include + +#endif + +namespace Catch { + + namespace { +#ifdef CATCH_PLATFORM_WINDOWS + UInt64 getCurrentTicks() { + static UInt64 hz=0, hzo=0; + if (!hz) { + QueryPerformanceFrequency( reinterpret_cast( &hz ) ); + QueryPerformanceCounter( reinterpret_cast( &hzo ) ); + } + UInt64 t; + QueryPerformanceCounter( reinterpret_cast( &t ) ); + return ((t-hzo)*1000000)/hz; + } +#else + UInt64 getCurrentTicks() { + timeval t; + gettimeofday(&t,CATCH_NULL); + return static_cast( t.tv_sec ) * 1000000ull + static_cast( t.tv_usec ); + } +#endif + } + + void Timer::start() { + m_ticks = getCurrentTicks(); + } + unsigned int Timer::getElapsedMicroseconds() const { + return static_cast(getCurrentTicks() - m_ticks); + } + unsigned int Timer::getElapsedMilliseconds() const { + return static_cast(getElapsedMicroseconds()/1000); + } + double Timer::getElapsedSeconds() const { + return getElapsedMicroseconds()/1000000.0; + } + +} // namespace Catch + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif +// #included from: catch_common.hpp +#define TWOBLUECUBES_CATCH_COMMON_HPP_INCLUDED + +#include +#include + +namespace Catch { + + bool startsWith( std::string const& s, std::string const& prefix ) { + return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin()); + } + bool startsWith( std::string const& s, char prefix ) { + return !s.empty() && s[0] == prefix; + } + bool endsWith( std::string const& s, std::string const& suffix ) { + return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin()); + } + bool endsWith( std::string const& s, char suffix ) { + return !s.empty() && s[s.size()-1] == suffix; + } + bool contains( std::string const& s, std::string const& infix ) { + return s.find( infix ) != std::string::npos; + } + char toLowerCh(char c) { + return static_cast( std::tolower( c ) ); + } + void toLowerInPlace( std::string& s ) { + std::transform( s.begin(), s.end(), s.begin(), toLowerCh ); + } + std::string toLower( std::string const& s ) { + std::string lc = s; + toLowerInPlace( lc ); + return lc; + } + std::string trim( std::string const& str ) { + static char const* whitespaceChars = "\n\r\t "; + std::string::size_type start = str.find_first_not_of( whitespaceChars ); + std::string::size_type end = str.find_last_not_of( whitespaceChars ); + + return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string(); + } + + bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) { + bool replaced = false; + std::size_t i = str.find( replaceThis ); + while( i != std::string::npos ) { + replaced = true; + str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() ); + if( i < str.size()-withThis.size() ) + i = str.find( replaceThis, i+withThis.size() ); + else + i = std::string::npos; + } + return replaced; + } + + pluralise::pluralise( std::size_t count, std::string const& label ) + : m_count( count ), + m_label( label ) + {} + + std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) { + os << pluraliser.m_count << ' ' << pluraliser.m_label; + if( pluraliser.m_count != 1 ) + os << 's'; + return os; + } + + SourceLineInfo::SourceLineInfo() : file(""), line( 0 ){} + SourceLineInfo::SourceLineInfo( char const* _file, std::size_t _line ) + : file( _file ), + line( _line ) + {} + bool SourceLineInfo::empty() const { + return file[0] == '\0'; + } + bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const { + return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0); + } + bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const { + return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0)); + } + + void seedRng( IConfig const& config ) { + if( config.rngSeed() != 0 ) + std::srand( config.rngSeed() ); + } + unsigned int rngSeed() { + return getCurrentContext().getConfig()->rngSeed(); + } + + std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) { +#ifndef __GNUG__ + os << info.file << '(' << info.line << ')'; +#else + os << info.file << ':' << info.line; +#endif + return os; + } + + void throwLogicError( std::string const& message, SourceLineInfo const& locationInfo ) { + std::ostringstream oss; + oss << locationInfo << ": Internal Catch error: '" << message << '\''; + if( alwaysTrue() ) + throw std::logic_error( oss.str() ); + } +} + +// #included from: catch_section.hpp +#define TWOBLUECUBES_CATCH_SECTION_HPP_INCLUDED + +namespace Catch { + + SectionInfo::SectionInfo + ( SourceLineInfo const& _lineInfo, + std::string const& _name, + std::string const& _description ) + : name( _name ), + description( _description ), + lineInfo( _lineInfo ) + {} + + Section::Section( SectionInfo const& info ) + : m_info( info ), + m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) ) + { + m_timer.start(); + } + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17 +#endif + Section::~Section() { + if( m_sectionIncluded ) { + SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() ); + if( std::uncaught_exception() ) + getResultCapture().sectionEndedEarly( endInfo ); + else + getResultCapture().sectionEnded( endInfo ); + } + } +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + + // This indicates whether the section should be executed or not + Section::operator bool() const { + return m_sectionIncluded; + } + +} // end namespace Catch + +// #included from: catch_debugger.hpp +#define TWOBLUECUBES_CATCH_DEBUGGER_HPP_INCLUDED + +#ifdef CATCH_PLATFORM_MAC + + #include + #include + #include + #include + #include + + namespace Catch{ + + // The following function is taken directly from the following technical note: + // http://developer.apple.com/library/mac/#qa/qa2004/qa1361.html + + // Returns true if the current process is being debugged (either + // running under the debugger or has a debugger attached post facto). + bool isDebuggerActive(){ + + int mib[4]; + struct kinfo_proc info; + size_t size; + + // Initialize the flags so that, if sysctl fails for some bizarre + // reason, we get a predictable result. + + info.kp_proc.p_flag = 0; + + // Initialize mib, which tells sysctl the info we want, in this case + // we're looking for information about a specific process ID. + + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PID; + mib[3] = getpid(); + + // Call sysctl. + + size = sizeof(info); + if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, CATCH_NULL, 0) != 0 ) { + Catch::cerr() << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << std::endl; + return false; + } + + // We're being debugged if the P_TRACED flag is set. + + return ( (info.kp_proc.p_flag & P_TRACED) != 0 ); + } + } // namespace Catch + +#elif defined(CATCH_PLATFORM_LINUX) + #include + #include + + namespace Catch{ + // The standard POSIX way of detecting a debugger is to attempt to + // ptrace() the process, but this needs to be done from a child and not + // this process itself to still allow attaching to this process later + // if wanted, so is rather heavy. Under Linux we have the PID of the + // "debugger" (which doesn't need to be gdb, of course, it could also + // be strace, for example) in /proc/$PID/status, so just get it from + // there instead. + bool isDebuggerActive(){ + // Libstdc++ has a bug, where std::ifstream sets errno to 0 + // This way our users can properly assert over errno values + ErrnoGuard guard; + std::ifstream in("/proc/self/status"); + for( std::string line; std::getline(in, line); ) { + static const int PREFIX_LEN = 11; + if( line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0 ) { + // We're traced if the PID is not 0 and no other PID starts + // with 0 digit, so it's enough to check for just a single + // character. + return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0'; + } + } + + return false; + } + } // namespace Catch +#elif defined(_MSC_VER) + extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); + namespace Catch { + bool isDebuggerActive() { + return IsDebuggerPresent() != 0; + } + } +#elif defined(__MINGW32__) + extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); + namespace Catch { + bool isDebuggerActive() { + return IsDebuggerPresent() != 0; + } + } +#else + namespace Catch { + inline bool isDebuggerActive() { return false; } + } +#endif // Platform + +#ifdef CATCH_PLATFORM_WINDOWS + + namespace Catch { + void writeToDebugConsole( std::string const& text ) { + ::OutputDebugStringA( text.c_str() ); + } + } +#else + namespace Catch { + void writeToDebugConsole( std::string const& text ) { + // !TBD: Need a version for Mac/ XCode and other IDEs + Catch::cout() << text; + } + } +#endif // Platform + +// #included from: catch_tostring.hpp +#define TWOBLUECUBES_CATCH_TOSTRING_HPP_INCLUDED + +namespace Catch { + +namespace Detail { + + const std::string unprintableString = "{?}"; + + namespace { + const int hexThreshold = 255; + + struct Endianness { + enum Arch { Big, Little }; + + static Arch which() { + union _{ + int asInt; + char asChar[sizeof (int)]; + } u; + + u.asInt = 1; + return ( u.asChar[sizeof(int)-1] == 1 ) ? Big : Little; + } + }; + } + + std::string rawMemoryToString( const void *object, std::size_t size ) + { + // Reverse order for little endian architectures + int i = 0, end = static_cast( size ), inc = 1; + if( Endianness::which() == Endianness::Little ) { + i = end-1; + end = inc = -1; + } + + unsigned char const *bytes = static_cast(object); + std::ostringstream os; + os << "0x" << std::setfill('0') << std::hex; + for( ; i != end; i += inc ) + os << std::setw(2) << static_cast(bytes[i]); + return os.str(); + } +} + +std::string toString( std::string const& value ) { + std::string s = value; + if( getCurrentContext().getConfig()->showInvisibles() ) { + for(size_t i = 0; i < s.size(); ++i ) { + std::string subs; + switch( s[i] ) { + case '\n': subs = "\\n"; break; + case '\t': subs = "\\t"; break; + default: break; + } + if( !subs.empty() ) { + s = s.substr( 0, i ) + subs + s.substr( i+1 ); + ++i; + } + } + } + return '"' + s + '"'; +} +std::string toString( std::wstring const& value ) { + + std::string s; + s.reserve( value.size() ); + for(size_t i = 0; i < value.size(); ++i ) + s += value[i] <= 0xff ? static_cast( value[i] ) : '?'; + return Catch::toString( s ); +} + +std::string toString( const char* const value ) { + return value ? Catch::toString( std::string( value ) ) : std::string( "{null string}" ); +} + +std::string toString( char* const value ) { + return Catch::toString( static_cast( value ) ); +} + +std::string toString( const wchar_t* const value ) +{ + return value ? Catch::toString( std::wstring(value) ) : std::string( "{null string}" ); +} + +std::string toString( wchar_t* const value ) +{ + return Catch::toString( static_cast( value ) ); +} + +std::string toString( int value ) { + std::ostringstream oss; + oss << value; + if( value > Detail::hexThreshold ) + oss << " (0x" << std::hex << value << ')'; + return oss.str(); +} + +std::string toString( unsigned long value ) { + std::ostringstream oss; + oss << value; + if( value > Detail::hexThreshold ) + oss << " (0x" << std::hex << value << ')'; + return oss.str(); +} + +std::string toString( unsigned int value ) { + return Catch::toString( static_cast( value ) ); +} + +template +std::string fpToString( T value, int precision ) { + std::ostringstream oss; + oss << std::setprecision( precision ) + << std::fixed + << value; + std::string d = oss.str(); + std::size_t i = d.find_last_not_of( '0' ); + if( i != std::string::npos && i != d.size()-1 ) { + if( d[i] == '.' ) + i++; + d = d.substr( 0, i+1 ); + } + return d; +} + +std::string toString( const double value ) { + return fpToString( value, 10 ); +} +std::string toString( const float value ) { + return fpToString( value, 5 ) + 'f'; +} + +std::string toString( bool value ) { + return value ? "true" : "false"; +} + +std::string toString( char value ) { + if ( value == '\r' ) + return "'\\r'"; + if ( value == '\f' ) + return "'\\f'"; + if ( value == '\n' ) + return "'\\n'"; + if ( value == '\t' ) + return "'\\t'"; + if ( '\0' <= value && value < ' ' ) + return toString( static_cast( value ) ); + char chstr[] = "' '"; + chstr[1] = value; + return chstr; +} + +std::string toString( signed char value ) { + return toString( static_cast( value ) ); +} + +std::string toString( unsigned char value ) { + return toString( static_cast( value ) ); +} + +#ifdef CATCH_CONFIG_CPP11_LONG_LONG +std::string toString( long long value ) { + std::ostringstream oss; + oss << value; + if( value > Detail::hexThreshold ) + oss << " (0x" << std::hex << value << ')'; + return oss.str(); +} +std::string toString( unsigned long long value ) { + std::ostringstream oss; + oss << value; + if( value > Detail::hexThreshold ) + oss << " (0x" << std::hex << value << ')'; + return oss.str(); +} +#endif + +#ifdef CATCH_CONFIG_CPP11_NULLPTR +std::string toString( std::nullptr_t ) { + return "nullptr"; +} +#endif + +#ifdef __OBJC__ + std::string toString( NSString const * const& nsstring ) { + if( !nsstring ) + return "nil"; + return "@" + toString([nsstring UTF8String]); + } + std::string toString( NSString * CATCH_ARC_STRONG & nsstring ) { + if( !nsstring ) + return "nil"; + return "@" + toString([nsstring UTF8String]); + } + std::string toString( NSObject* const& nsObject ) { + return toString( [nsObject description] ); + } +#endif + +} // end namespace Catch + +// #included from: catch_result_builder.hpp +#define TWOBLUECUBES_CATCH_RESULT_BUILDER_HPP_INCLUDED + +namespace Catch { + + ResultBuilder::ResultBuilder( char const* macroName, + SourceLineInfo const& lineInfo, + char const* capturedExpression, + ResultDisposition::Flags resultDisposition, + char const* secondArg ) + : m_assertionInfo( macroName, lineInfo, capturedExpression, resultDisposition, secondArg ), + m_shouldDebugBreak( false ), + m_shouldThrow( false ), + m_guardException( false ), + m_usedStream( false ) + {} + + ResultBuilder::~ResultBuilder() { +#if defined(CATCH_CONFIG_FAST_COMPILE) + if ( m_guardException ) { + stream().oss << "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"; + captureResult( ResultWas::ThrewException ); + getCurrentContext().getResultCapture()->exceptionEarlyReported(); + } +#endif + } + + ResultBuilder& ResultBuilder::setResultType( ResultWas::OfType result ) { + m_data.resultType = result; + return *this; + } + ResultBuilder& ResultBuilder::setResultType( bool result ) { + m_data.resultType = result ? ResultWas::Ok : ResultWas::ExpressionFailed; + return *this; + } + + void ResultBuilder::endExpression( DecomposedExpression const& expr ) { + // Flip bool results if FalseTest flag is set + if( isFalseTest( m_assertionInfo.resultDisposition ) ) { + m_data.negate( expr.isBinaryExpression() ); + } + + getResultCapture().assertionRun(); + + if(getCurrentContext().getConfig()->includeSuccessfulResults() || m_data.resultType != ResultWas::Ok) + { + AssertionResult result = build( expr ); + handleResult( result ); + } + else + getResultCapture().assertionPassed(); + } + + void ResultBuilder::useActiveException( ResultDisposition::Flags resultDisposition ) { + m_assertionInfo.resultDisposition = resultDisposition; + stream().oss << Catch::translateActiveException(); + captureResult( ResultWas::ThrewException ); + } + + void ResultBuilder::captureResult( ResultWas::OfType resultType ) { + setResultType( resultType ); + captureExpression(); + } + + void ResultBuilder::captureExpectedException( std::string const& expectedMessage ) { + if( expectedMessage.empty() ) + captureExpectedException( Matchers::Impl::MatchAllOf() ); + else + captureExpectedException( Matchers::Equals( expectedMessage ) ); + } + + void ResultBuilder::captureExpectedException( Matchers::Impl::MatcherBase const& matcher ) { + + assert( !isFalseTest( m_assertionInfo.resultDisposition ) ); + AssertionResultData data = m_data; + data.resultType = ResultWas::Ok; + data.reconstructedExpression = capturedExpressionWithSecondArgument(m_assertionInfo.capturedExpression, m_assertionInfo.secondArg); + + std::string actualMessage = Catch::translateActiveException(); + if( !matcher.match( actualMessage ) ) { + data.resultType = ResultWas::ExpressionFailed; + data.reconstructedExpression = actualMessage; + } + AssertionResult result( m_assertionInfo, data ); + handleResult( result ); + } + + void ResultBuilder::captureExpression() { + AssertionResult result = build(); + handleResult( result ); + } + + void ResultBuilder::handleResult( AssertionResult const& result ) + { + getResultCapture().assertionEnded( result ); + + if( !result.isOk() ) { + if( getCurrentContext().getConfig()->shouldDebugBreak() ) + m_shouldDebugBreak = true; + if( getCurrentContext().getRunner()->aborting() || (m_assertionInfo.resultDisposition & ResultDisposition::Normal) ) + m_shouldThrow = true; + } + } + + void ResultBuilder::react() { +#if defined(CATCH_CONFIG_FAST_COMPILE) + if (m_shouldDebugBreak) { + /////////////////////////////////////////////////////////////////// + // To inspect the state during test, you need to go one level up the callstack + // To go back to the test and change execution, jump over the throw statement + /////////////////////////////////////////////////////////////////// + CATCH_BREAK_INTO_DEBUGGER(); + } +#endif + if( m_shouldThrow ) + throw Catch::TestFailureException(); + } + + bool ResultBuilder::shouldDebugBreak() const { return m_shouldDebugBreak; } + bool ResultBuilder::allowThrows() const { return getCurrentContext().getConfig()->allowThrows(); } + + AssertionResult ResultBuilder::build() const + { + return build( *this ); + } + + // CAVEAT: The returned AssertionResult stores a pointer to the argument expr, + // a temporary DecomposedExpression, which in turn holds references to + // operands, possibly temporary as well. + // It should immediately be passed to handleResult; if the expression + // needs to be reported, its string expansion must be composed before + // the temporaries are destroyed. + AssertionResult ResultBuilder::build( DecomposedExpression const& expr ) const + { + assert( m_data.resultType != ResultWas::Unknown ); + AssertionResultData data = m_data; + + if(m_usedStream) + data.message = m_stream().oss.str(); + data.decomposedExpression = &expr; // for lazy reconstruction + return AssertionResult( m_assertionInfo, data ); + } + + void ResultBuilder::reconstructExpression( std::string& dest ) const { + dest = capturedExpressionWithSecondArgument(m_assertionInfo.capturedExpression, m_assertionInfo.secondArg); + } + + void ResultBuilder::setExceptionGuard() { + m_guardException = true; + } + void ResultBuilder::unsetExceptionGuard() { + m_guardException = false; + } + +} // end namespace Catch + +// #included from: catch_tag_alias_registry.hpp +#define TWOBLUECUBES_CATCH_TAG_ALIAS_REGISTRY_HPP_INCLUDED + +namespace Catch { + + TagAliasRegistry::~TagAliasRegistry() {} + + Option TagAliasRegistry::find( std::string const& alias ) const { + std::map::const_iterator it = m_registry.find( alias ); + if( it != m_registry.end() ) + return it->second; + else + return Option(); + } + + std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const { + std::string expandedTestSpec = unexpandedTestSpec; + for( std::map::const_iterator it = m_registry.begin(), itEnd = m_registry.end(); + it != itEnd; + ++it ) { + std::size_t pos = expandedTestSpec.find( it->first ); + if( pos != std::string::npos ) { + expandedTestSpec = expandedTestSpec.substr( 0, pos ) + + it->second.tag + + expandedTestSpec.substr( pos + it->first.size() ); + } + } + return expandedTestSpec; + } + + void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) { + + if( !startsWith( alias, "[@" ) || !endsWith( alias, ']' ) ) { + std::ostringstream oss; + oss << Colour( Colour::Red ) + << "error: tag alias, \"" << alias << "\" is not of the form [@alias name].\n" + << Colour( Colour::FileName ) + << lineInfo << '\n'; + throw std::domain_error( oss.str().c_str() ); + } + if( !m_registry.insert( std::make_pair( alias, TagAlias( tag, lineInfo ) ) ).second ) { + std::ostringstream oss; + oss << Colour( Colour::Red ) + << "error: tag alias, \"" << alias << "\" already registered.\n" + << "\tFirst seen at " + << Colour( Colour::Red ) << find(alias)->lineInfo << '\n' + << Colour( Colour::Red ) << "\tRedefined at " + << Colour( Colour::FileName) << lineInfo << '\n'; + throw std::domain_error( oss.str().c_str() ); + } + } + + ITagAliasRegistry::~ITagAliasRegistry() {} + + ITagAliasRegistry const& ITagAliasRegistry::get() { + return getRegistryHub().getTagAliasRegistry(); + } + + RegistrarForTagAliases::RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ) { + getMutableRegistryHub().registerTagAlias( alias, tag, lineInfo ); + } + +} // end namespace Catch + +// #included from: catch_matchers_string.hpp + +namespace Catch { +namespace Matchers { + + namespace StdString { + + CasedString::CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity ) + : m_caseSensitivity( caseSensitivity ), + m_str( adjustString( str ) ) + {} + std::string CasedString::adjustString( std::string const& str ) const { + return m_caseSensitivity == CaseSensitive::No + ? toLower( str ) + : str; + } + std::string CasedString::caseSensitivitySuffix() const { + return m_caseSensitivity == CaseSensitive::No + ? " (case insensitive)" + : std::string(); + } + + StringMatcherBase::StringMatcherBase( std::string const& operation, CasedString const& comparator ) + : m_comparator( comparator ), + m_operation( operation ) { + } + + std::string StringMatcherBase::describe() const { + std::string description; + description.reserve(5 + m_operation.size() + m_comparator.m_str.size() + + m_comparator.caseSensitivitySuffix().size()); + description += m_operation; + description += ": \""; + description += m_comparator.m_str; + description += "\""; + description += m_comparator.caseSensitivitySuffix(); + return description; + } + + EqualsMatcher::EqualsMatcher( CasedString const& comparator ) : StringMatcherBase( "equals", comparator ) {} + + bool EqualsMatcher::match( std::string const& source ) const { + return m_comparator.adjustString( source ) == m_comparator.m_str; + } + + ContainsMatcher::ContainsMatcher( CasedString const& comparator ) : StringMatcherBase( "contains", comparator ) {} + + bool ContainsMatcher::match( std::string const& source ) const { + return contains( m_comparator.adjustString( source ), m_comparator.m_str ); + } + + StartsWithMatcher::StartsWithMatcher( CasedString const& comparator ) : StringMatcherBase( "starts with", comparator ) {} + + bool StartsWithMatcher::match( std::string const& source ) const { + return startsWith( m_comparator.adjustString( source ), m_comparator.m_str ); + } + + EndsWithMatcher::EndsWithMatcher( CasedString const& comparator ) : StringMatcherBase( "ends with", comparator ) {} + + bool EndsWithMatcher::match( std::string const& source ) const { + return endsWith( m_comparator.adjustString( source ), m_comparator.m_str ); + } + + } // namespace StdString + + StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity ) { + return StdString::EqualsMatcher( StdString::CasedString( str, caseSensitivity) ); + } + StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity ) { + return StdString::ContainsMatcher( StdString::CasedString( str, caseSensitivity) ); + } + StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) { + return StdString::EndsWithMatcher( StdString::CasedString( str, caseSensitivity) ); + } + StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) { + return StdString::StartsWithMatcher( StdString::CasedString( str, caseSensitivity) ); + } + +} // namespace Matchers +} // namespace Catch +// #included from: ../reporters/catch_reporter_multi.hpp +#define TWOBLUECUBES_CATCH_REPORTER_MULTI_HPP_INCLUDED + +namespace Catch { + +class MultipleReporters : public SharedImpl { + typedef std::vector > Reporters; + Reporters m_reporters; + +public: + void add( Ptr const& reporter ) { + m_reporters.push_back( reporter ); + } + +public: // IStreamingReporter + + virtual ReporterPreferences getPreferences() const CATCH_OVERRIDE { + return m_reporters[0]->getPreferences(); + } + + virtual void noMatchingTestCases( std::string const& spec ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->noMatchingTestCases( spec ); + } + + virtual void testRunStarting( TestRunInfo const& testRunInfo ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->testRunStarting( testRunInfo ); + } + + virtual void testGroupStarting( GroupInfo const& groupInfo ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->testGroupStarting( groupInfo ); + } + + virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->testCaseStarting( testInfo ); + } + + virtual void sectionStarting( SectionInfo const& sectionInfo ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->sectionStarting( sectionInfo ); + } + + virtual void assertionStarting( AssertionInfo const& assertionInfo ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->assertionStarting( assertionInfo ); + } + + // The return value indicates if the messages buffer should be cleared: + virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE { + bool clearBuffer = false; + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + clearBuffer |= (*it)->assertionEnded( assertionStats ); + return clearBuffer; + } + + virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->sectionEnded( sectionStats ); + } + + virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->testCaseEnded( testCaseStats ); + } + + virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->testGroupEnded( testGroupStats ); + } + + virtual void testRunEnded( TestRunStats const& testRunStats ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->testRunEnded( testRunStats ); + } + + virtual void skipTest( TestCaseInfo const& testInfo ) CATCH_OVERRIDE { + for( Reporters::const_iterator it = m_reporters.begin(), itEnd = m_reporters.end(); + it != itEnd; + ++it ) + (*it)->skipTest( testInfo ); + } + + virtual MultipleReporters* tryAsMulti() CATCH_OVERRIDE { + return this; + } + +}; + +Ptr addReporter( Ptr const& existingReporter, Ptr const& additionalReporter ) { + Ptr resultingReporter; + + if( existingReporter ) { + MultipleReporters* multi = existingReporter->tryAsMulti(); + if( !multi ) { + multi = new MultipleReporters; + resultingReporter = Ptr( multi ); + if( existingReporter ) + multi->add( existingReporter ); + } + else + resultingReporter = existingReporter; + multi->add( additionalReporter ); + } + else + resultingReporter = additionalReporter; + + return resultingReporter; +} + +} // end namespace Catch + +// #included from: ../reporters/catch_reporter_xml.hpp +#define TWOBLUECUBES_CATCH_REPORTER_XML_HPP_INCLUDED + +// #included from: catch_reporter_bases.hpp +#define TWOBLUECUBES_CATCH_REPORTER_BASES_HPP_INCLUDED + +#include +#include +#include +#include + +namespace Catch { + + namespace { + // Because formatting using c++ streams is stateful, drop down to C is required + // Alternatively we could use stringstream, but its performance is... not good. + std::string getFormattedDuration( double duration ) { + // Max exponent + 1 is required to represent the whole part + // + 1 for decimal point + // + 3 for the 3 decimal places + // + 1 for null terminator + const size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1; + char buffer[maxDoubleSize]; + + // Save previous errno, to prevent sprintf from overwriting it + ErrnoGuard guard; +#ifdef _MSC_VER + sprintf_s(buffer, "%.3f", duration); +#else + sprintf(buffer, "%.3f", duration); +#endif + return std::string(buffer); + } + } + + struct StreamingReporterBase : SharedImpl { + + StreamingReporterBase( ReporterConfig const& _config ) + : m_config( _config.fullConfig() ), + stream( _config.stream() ) + { + m_reporterPrefs.shouldRedirectStdOut = false; + } + + virtual ReporterPreferences getPreferences() const CATCH_OVERRIDE { + return m_reporterPrefs; + } + + virtual ~StreamingReporterBase() CATCH_OVERRIDE; + + virtual void noMatchingTestCases( std::string const& ) CATCH_OVERRIDE {} + + virtual void testRunStarting( TestRunInfo const& _testRunInfo ) CATCH_OVERRIDE { + currentTestRunInfo = _testRunInfo; + } + virtual void testGroupStarting( GroupInfo const& _groupInfo ) CATCH_OVERRIDE { + currentGroupInfo = _groupInfo; + } + + virtual void testCaseStarting( TestCaseInfo const& _testInfo ) CATCH_OVERRIDE { + currentTestCaseInfo = _testInfo; + } + virtual void sectionStarting( SectionInfo const& _sectionInfo ) CATCH_OVERRIDE { + m_sectionStack.push_back( _sectionInfo ); + } + + virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) CATCH_OVERRIDE { + m_sectionStack.pop_back(); + } + virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats */ ) CATCH_OVERRIDE { + currentTestCaseInfo.reset(); + } + virtual void testGroupEnded( TestGroupStats const& /* _testGroupStats */ ) CATCH_OVERRIDE { + currentGroupInfo.reset(); + } + virtual void testRunEnded( TestRunStats const& /* _testRunStats */ ) CATCH_OVERRIDE { + currentTestCaseInfo.reset(); + currentGroupInfo.reset(); + currentTestRunInfo.reset(); + } + + virtual void skipTest( TestCaseInfo const& ) CATCH_OVERRIDE { + // Don't do anything with this by default. + // It can optionally be overridden in the derived class. + } + + Ptr m_config; + std::ostream& stream; + + LazyStat currentTestRunInfo; + LazyStat currentGroupInfo; + LazyStat currentTestCaseInfo; + + std::vector m_sectionStack; + ReporterPreferences m_reporterPrefs; + }; + + struct CumulativeReporterBase : SharedImpl { + template + struct Node : SharedImpl<> { + explicit Node( T const& _value ) : value( _value ) {} + virtual ~Node() {} + + typedef std::vector > ChildNodes; + T value; + ChildNodes children; + }; + struct SectionNode : SharedImpl<> { + explicit SectionNode( SectionStats const& _stats ) : stats( _stats ) {} + virtual ~SectionNode(); + + bool operator == ( SectionNode const& other ) const { + return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo; + } + bool operator == ( Ptr const& other ) const { + return operator==( *other ); + } + + SectionStats stats; + typedef std::vector > ChildSections; + typedef std::vector Assertions; + ChildSections childSections; + Assertions assertions; + std::string stdOut; + std::string stdErr; + }; + + struct BySectionInfo { + BySectionInfo( SectionInfo const& other ) : m_other( other ) {} + BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} + bool operator() ( Ptr const& node ) const { + return ((node->stats.sectionInfo.name == m_other.name) && + (node->stats.sectionInfo.lineInfo == m_other.lineInfo)); + } + private: + void operator=( BySectionInfo const& ); + SectionInfo const& m_other; + }; + + typedef Node TestCaseNode; + typedef Node TestGroupNode; + typedef Node TestRunNode; + + CumulativeReporterBase( ReporterConfig const& _config ) + : m_config( _config.fullConfig() ), + stream( _config.stream() ) + { + m_reporterPrefs.shouldRedirectStdOut = false; + } + ~CumulativeReporterBase(); + + virtual ReporterPreferences getPreferences() const CATCH_OVERRIDE { + return m_reporterPrefs; + } + + virtual void testRunStarting( TestRunInfo const& ) CATCH_OVERRIDE {} + virtual void testGroupStarting( GroupInfo const& ) CATCH_OVERRIDE {} + + virtual void testCaseStarting( TestCaseInfo const& ) CATCH_OVERRIDE {} + + virtual void sectionStarting( SectionInfo const& sectionInfo ) CATCH_OVERRIDE { + SectionStats incompleteStats( sectionInfo, Counts(), 0, false ); + Ptr node; + if( m_sectionStack.empty() ) { + if( !m_rootSection ) + m_rootSection = new SectionNode( incompleteStats ); + node = m_rootSection; + } + else { + SectionNode& parentNode = *m_sectionStack.back(); + SectionNode::ChildSections::const_iterator it = + std::find_if( parentNode.childSections.begin(), + parentNode.childSections.end(), + BySectionInfo( sectionInfo ) ); + if( it == parentNode.childSections.end() ) { + node = new SectionNode( incompleteStats ); + parentNode.childSections.push_back( node ); + } + else + node = *it; + } + m_sectionStack.push_back( node ); + m_deepestSection = node; + } + + virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE {} + + virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE { + assert( !m_sectionStack.empty() ); + SectionNode& sectionNode = *m_sectionStack.back(); + sectionNode.assertions.push_back( assertionStats ); + // AssertionResult holds a pointer to a temporary DecomposedExpression, + // which getExpandedExpression() calls to build the expression string. + // Our section stack copy of the assertionResult will likely outlive the + // temporary, so it must be expanded or discarded now to avoid calling + // a destroyed object later. + prepareExpandedExpression( sectionNode.assertions.back().assertionResult ); + return true; + } + virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE { + assert( !m_sectionStack.empty() ); + SectionNode& node = *m_sectionStack.back(); + node.stats = sectionStats; + m_sectionStack.pop_back(); + } + virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE { + Ptr node = new TestCaseNode( testCaseStats ); + assert( m_sectionStack.size() == 0 ); + node->children.push_back( m_rootSection ); + m_testCases.push_back( node ); + m_rootSection.reset(); + + assert( m_deepestSection ); + m_deepestSection->stdOut = testCaseStats.stdOut; + m_deepestSection->stdErr = testCaseStats.stdErr; + } + virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE { + Ptr node = new TestGroupNode( testGroupStats ); + node->children.swap( m_testCases ); + m_testGroups.push_back( node ); + } + virtual void testRunEnded( TestRunStats const& testRunStats ) CATCH_OVERRIDE { + Ptr node = new TestRunNode( testRunStats ); + node->children.swap( m_testGroups ); + m_testRuns.push_back( node ); + testRunEndedCumulative(); + } + virtual void testRunEndedCumulative() = 0; + + virtual void skipTest( TestCaseInfo const& ) CATCH_OVERRIDE {} + + virtual void prepareExpandedExpression( AssertionResult& result ) const { + if( result.isOk() ) + result.discardDecomposedExpression(); + else + result.expandDecomposedExpression(); + } + + Ptr m_config; + std::ostream& stream; + std::vector m_assertions; + std::vector > > m_sections; + std::vector > m_testCases; + std::vector > m_testGroups; + + std::vector > m_testRuns; + + Ptr m_rootSection; + Ptr m_deepestSection; + std::vector > m_sectionStack; + ReporterPreferences m_reporterPrefs; + + }; + + template + char const* getLineOfChars() { + static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0}; + if( !*line ) { + std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 ); + line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0; + } + return line; + } + + struct TestEventListenerBase : StreamingReporterBase { + TestEventListenerBase( ReporterConfig const& _config ) + : StreamingReporterBase( _config ) + {} + + virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE {} + virtual bool assertionEnded( AssertionStats const& ) CATCH_OVERRIDE { + return false; + } + }; + +} // end namespace Catch + +// #included from: ../internal/catch_reporter_registrars.hpp +#define TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED + +namespace Catch { + + template + class LegacyReporterRegistrar { + + class ReporterFactory : public IReporterFactory { + virtual IStreamingReporter* create( ReporterConfig const& config ) const { + return new LegacyReporterAdapter( new T( config ) ); + } + + virtual std::string getDescription() const { + return T::getDescription(); + } + }; + + public: + + LegacyReporterRegistrar( std::string const& name ) { + getMutableRegistryHub().registerReporter( name, new ReporterFactory() ); + } + }; + + template + class ReporterRegistrar { + + class ReporterFactory : public SharedImpl { + + // *** Please Note ***: + // - If you end up here looking at a compiler error because it's trying to register + // your custom reporter class be aware that the native reporter interface has changed + // to IStreamingReporter. The "legacy" interface, IReporter, is still supported via + // an adapter. Just use REGISTER_LEGACY_REPORTER to take advantage of the adapter. + // However please consider updating to the new interface as the old one is now + // deprecated and will probably be removed quite soon! + // Please contact me via github if you have any questions at all about this. + // In fact, ideally, please contact me anyway to let me know you've hit this - as I have + // no idea who is actually using custom reporters at all (possibly no-one!). + // The new interface is designed to minimise exposure to interface changes in the future. + virtual IStreamingReporter* create( ReporterConfig const& config ) const { + return new T( config ); + } + + virtual std::string getDescription() const { + return T::getDescription(); + } + }; + + public: + + ReporterRegistrar( std::string const& name ) { + getMutableRegistryHub().registerReporter( name, new ReporterFactory() ); + } + }; + + template + class ListenerRegistrar { + + class ListenerFactory : public SharedImpl { + + virtual IStreamingReporter* create( ReporterConfig const& config ) const { + return new T( config ); + } + virtual std::string getDescription() const { + return std::string(); + } + }; + + public: + + ListenerRegistrar() { + getMutableRegistryHub().registerListener( new ListenerFactory() ); + } + }; +} + +#define INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( name, reporterType ) \ + namespace{ Catch::LegacyReporterRegistrar catch_internal_RegistrarFor##reporterType( name ); } + +#define INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType ) \ + namespace{ Catch::ReporterRegistrar catch_internal_RegistrarFor##reporterType( name ); } + +// Deprecated - use the form without INTERNAL_ +#define INTERNAL_CATCH_REGISTER_LISTENER( listenerType ) \ + namespace{ Catch::ListenerRegistrar catch_internal_RegistrarFor##listenerType; } + +#define CATCH_REGISTER_LISTENER( listenerType ) \ + namespace{ Catch::ListenerRegistrar catch_internal_RegistrarFor##listenerType; } + +// #included from: ../internal/catch_xmlwriter.hpp +#define TWOBLUECUBES_CATCH_XMLWRITER_HPP_INCLUDED + +#include +#include +#include +#include + +namespace Catch { + + class XmlEncode { + public: + enum ForWhat { ForTextNodes, ForAttributes }; + + XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes ) + : m_str( str ), + m_forWhat( forWhat ) + {} + + void encodeTo( std::ostream& os ) const { + + // Apostrophe escaping not necessary if we always use " to write attributes + // (see: http://www.w3.org/TR/xml/#syntax) + + for( std::size_t i = 0; i < m_str.size(); ++ i ) { + char c = m_str[i]; + switch( c ) { + case '<': os << "<"; break; + case '&': os << "&"; break; + + case '>': + // See: http://www.w3.org/TR/xml/#syntax + if( i > 2 && m_str[i-1] == ']' && m_str[i-2] == ']' ) + os << ">"; + else + os << c; + break; + + case '\"': + if( m_forWhat == ForAttributes ) + os << """; + else + os << c; + break; + + default: + // Escape control chars - based on contribution by @espenalb in PR #465 and + // by @mrpi PR #588 + if ( ( c >= 0 && c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) { + // see http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0 + os << "\\x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) + << static_cast( c ); + } + else + os << c; + } + } + } + + friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) { + xmlEncode.encodeTo( os ); + return os; + } + + private: + std::string m_str; + ForWhat m_forWhat; + }; + + class XmlWriter { + public: + + class ScopedElement { + public: + ScopedElement( XmlWriter* writer ) + : m_writer( writer ) + {} + + ScopedElement( ScopedElement const& other ) + : m_writer( other.m_writer ){ + other.m_writer = CATCH_NULL; + } + + ~ScopedElement() { + if( m_writer ) + m_writer->endElement(); + } + + ScopedElement& writeText( std::string const& text, bool indent = true ) { + m_writer->writeText( text, indent ); + return *this; + } + + template + ScopedElement& writeAttribute( std::string const& name, T const& attribute ) { + m_writer->writeAttribute( name, attribute ); + return *this; + } + + private: + mutable XmlWriter* m_writer; + }; + + XmlWriter() + : m_tagIsOpen( false ), + m_needsNewline( false ), + m_os( Catch::cout() ) + { + writeDeclaration(); + } + + XmlWriter( std::ostream& os ) + : m_tagIsOpen( false ), + m_needsNewline( false ), + m_os( os ) + { + writeDeclaration(); + } + + ~XmlWriter() { + while( !m_tags.empty() ) + endElement(); + } + + XmlWriter& startElement( std::string const& name ) { + ensureTagClosed(); + newlineIfNecessary(); + m_os << m_indent << '<' << name; + m_tags.push_back( name ); + m_indent += " "; + m_tagIsOpen = true; + return *this; + } + + ScopedElement scopedElement( std::string const& name ) { + ScopedElement scoped( this ); + startElement( name ); + return scoped; + } + + XmlWriter& endElement() { + newlineIfNecessary(); + m_indent = m_indent.substr( 0, m_indent.size()-2 ); + if( m_tagIsOpen ) { + m_os << "/>"; + m_tagIsOpen = false; + } + else { + m_os << m_indent << ""; + } + m_os << std::endl; + m_tags.pop_back(); + return *this; + } + + XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ) { + if( !name.empty() && !attribute.empty() ) + m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; + return *this; + } + + XmlWriter& writeAttribute( std::string const& name, bool attribute ) { + m_os << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; + return *this; + } + + template + XmlWriter& writeAttribute( std::string const& name, T const& attribute ) { + std::ostringstream oss; + oss << attribute; + return writeAttribute( name, oss.str() ); + } + + XmlWriter& writeText( std::string const& text, bool indent = true ) { + if( !text.empty() ){ + bool tagWasOpen = m_tagIsOpen; + ensureTagClosed(); + if( tagWasOpen && indent ) + m_os << m_indent; + m_os << XmlEncode( text ); + m_needsNewline = true; + } + return *this; + } + + XmlWriter& writeComment( std::string const& text ) { + ensureTagClosed(); + m_os << m_indent << ""; + m_needsNewline = true; + return *this; + } + + void writeStylesheetRef( std::string const& url ) { + m_os << "\n"; + } + + XmlWriter& writeBlankLine() { + ensureTagClosed(); + m_os << '\n'; + return *this; + } + + void ensureTagClosed() { + if( m_tagIsOpen ) { + m_os << ">" << std::endl; + m_tagIsOpen = false; + } + } + + private: + XmlWriter( XmlWriter const& ); + void operator=( XmlWriter const& ); + + void writeDeclaration() { + m_os << "\n"; + } + + void newlineIfNecessary() { + if( m_needsNewline ) { + m_os << std::endl; + m_needsNewline = false; + } + } + + bool m_tagIsOpen; + bool m_needsNewline; + std::vector m_tags; + std::string m_indent; + std::ostream& m_os; + }; + +} + +namespace Catch { + class XmlReporter : public StreamingReporterBase { + public: + XmlReporter( ReporterConfig const& _config ) + : StreamingReporterBase( _config ), + m_xml(_config.stream()), + m_sectionDepth( 0 ) + { + m_reporterPrefs.shouldRedirectStdOut = true; + } + + virtual ~XmlReporter() CATCH_OVERRIDE; + + static std::string getDescription() { + return "Reports test results as an XML document"; + } + + virtual std::string getStylesheetRef() const { + return std::string(); + } + + void writeSourceInfo( SourceLineInfo const& sourceInfo ) { + m_xml + .writeAttribute( "filename", sourceInfo.file ) + .writeAttribute( "line", sourceInfo.line ); + } + + public: // StreamingReporterBase + + virtual void noMatchingTestCases( std::string const& s ) CATCH_OVERRIDE { + StreamingReporterBase::noMatchingTestCases( s ); + } + + virtual void testRunStarting( TestRunInfo const& testInfo ) CATCH_OVERRIDE { + StreamingReporterBase::testRunStarting( testInfo ); + std::string stylesheetRef = getStylesheetRef(); + if( !stylesheetRef.empty() ) + m_xml.writeStylesheetRef( stylesheetRef ); + m_xml.startElement( "Catch" ); + if( !m_config->name().empty() ) + m_xml.writeAttribute( "name", m_config->name() ); + } + + virtual void testGroupStarting( GroupInfo const& groupInfo ) CATCH_OVERRIDE { + StreamingReporterBase::testGroupStarting( groupInfo ); + m_xml.startElement( "Group" ) + .writeAttribute( "name", groupInfo.name ); + } + + virtual void testCaseStarting( TestCaseInfo const& testInfo ) CATCH_OVERRIDE { + StreamingReporterBase::testCaseStarting(testInfo); + m_xml.startElement( "TestCase" ) + .writeAttribute( "name", trim( testInfo.name ) ) + .writeAttribute( "description", testInfo.description ) + .writeAttribute( "tags", testInfo.tagsAsString ); + + writeSourceInfo( testInfo.lineInfo ); + + if ( m_config->showDurations() == ShowDurations::Always ) + m_testCaseTimer.start(); + m_xml.ensureTagClosed(); + } + + virtual void sectionStarting( SectionInfo const& sectionInfo ) CATCH_OVERRIDE { + StreamingReporterBase::sectionStarting( sectionInfo ); + if( m_sectionDepth++ > 0 ) { + m_xml.startElement( "Section" ) + .writeAttribute( "name", trim( sectionInfo.name ) ) + .writeAttribute( "description", sectionInfo.description ); + writeSourceInfo( sectionInfo.lineInfo ); + m_xml.ensureTagClosed(); + } + } + + virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE { } + + virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE { + + AssertionResult const& result = assertionStats.assertionResult; + + bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); + + if( includeResults ) { + // Print any info messages in tags. + for( std::vector::const_iterator it = assertionStats.infoMessages.begin(), itEnd = assertionStats.infoMessages.end(); + it != itEnd; + ++it ) { + if( it->type == ResultWas::Info ) { + m_xml.scopedElement( "Info" ) + .writeText( it->message ); + } else if ( it->type == ResultWas::Warning ) { + m_xml.scopedElement( "Warning" ) + .writeText( it->message ); + } + } + } + + // Drop out if result was successful but we're not printing them. + if( !includeResults && result.getResultType() != ResultWas::Warning ) + return true; + + // Print the expression if there is one. + if( result.hasExpression() ) { + m_xml.startElement( "Expression" ) + .writeAttribute( "success", result.succeeded() ) + .writeAttribute( "type", result.getTestMacroName() ); + + writeSourceInfo( result.getSourceInfo() ); + + m_xml.scopedElement( "Original" ) + .writeText( result.getExpression() ); + m_xml.scopedElement( "Expanded" ) + .writeText( result.getExpandedExpression() ); + } + + // And... Print a result applicable to each result type. + switch( result.getResultType() ) { + case ResultWas::ThrewException: + m_xml.startElement( "Exception" ); + writeSourceInfo( result.getSourceInfo() ); + m_xml.writeText( result.getMessage() ); + m_xml.endElement(); + break; + case ResultWas::FatalErrorCondition: + m_xml.startElement( "FatalErrorCondition" ); + writeSourceInfo( result.getSourceInfo() ); + m_xml.writeText( result.getMessage() ); + m_xml.endElement(); + break; + case ResultWas::Info: + m_xml.scopedElement( "Info" ) + .writeText( result.getMessage() ); + break; + case ResultWas::Warning: + // Warning will already have been written + break; + case ResultWas::ExplicitFailure: + m_xml.startElement( "Failure" ); + writeSourceInfo( result.getSourceInfo() ); + m_xml.writeText( result.getMessage() ); + m_xml.endElement(); + break; + default: + break; + } + + if( result.hasExpression() ) + m_xml.endElement(); + + return true; + } + + virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE { + StreamingReporterBase::sectionEnded( sectionStats ); + if( --m_sectionDepth > 0 ) { + XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" ); + e.writeAttribute( "successes", sectionStats.assertions.passed ); + e.writeAttribute( "failures", sectionStats.assertions.failed ); + e.writeAttribute( "expectedFailures", sectionStats.assertions.failedButOk ); + + if ( m_config->showDurations() == ShowDurations::Always ) + e.writeAttribute( "durationInSeconds", sectionStats.durationInSeconds ); + + m_xml.endElement(); + } + } + + virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE { + StreamingReporterBase::testCaseEnded( testCaseStats ); + XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResult" ); + e.writeAttribute( "success", testCaseStats.totals.assertions.allOk() ); + + if ( m_config->showDurations() == ShowDurations::Always ) + e.writeAttribute( "durationInSeconds", m_testCaseTimer.getElapsedSeconds() ); + + if( !testCaseStats.stdOut.empty() ) + m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), false ); + if( !testCaseStats.stdErr.empty() ) + m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), false ); + + m_xml.endElement(); + } + + virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE { + StreamingReporterBase::testGroupEnded( testGroupStats ); + // TODO: Check testGroupStats.aborting and act accordingly. + m_xml.scopedElement( "OverallResults" ) + .writeAttribute( "successes", testGroupStats.totals.assertions.passed ) + .writeAttribute( "failures", testGroupStats.totals.assertions.failed ) + .writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk ); + m_xml.endElement(); + } + + virtual void testRunEnded( TestRunStats const& testRunStats ) CATCH_OVERRIDE { + StreamingReporterBase::testRunEnded( testRunStats ); + m_xml.scopedElement( "OverallResults" ) + .writeAttribute( "successes", testRunStats.totals.assertions.passed ) + .writeAttribute( "failures", testRunStats.totals.assertions.failed ) + .writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk ); + m_xml.endElement(); + } + + private: + Timer m_testCaseTimer; + XmlWriter m_xml; + int m_sectionDepth; + }; + + INTERNAL_CATCH_REGISTER_REPORTER( "xml", XmlReporter ) + +} // end namespace Catch + +// #included from: ../reporters/catch_reporter_junit.hpp +#define TWOBLUECUBES_CATCH_REPORTER_JUNIT_HPP_INCLUDED + +#include + +namespace Catch { + + namespace { + std::string getCurrentTimestamp() { + // Beware, this is not reentrant because of backward compatibility issues + // Also, UTC only, again because of backward compatibility (%z is C++11) + time_t rawtime; + std::time(&rawtime); + const size_t timeStampSize = sizeof("2017-01-16T17:06:45Z"); + +#ifdef _MSC_VER + std::tm timeInfo = {}; + gmtime_s(&timeInfo, &rawtime); +#else + std::tm* timeInfo; + timeInfo = std::gmtime(&rawtime); +#endif + + char timeStamp[timeStampSize]; + const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; + +#ifdef _MSC_VER + std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); +#else + std::strftime(timeStamp, timeStampSize, fmt, timeInfo); +#endif + return std::string(timeStamp); + } + + } + + class JunitReporter : public CumulativeReporterBase { + public: + JunitReporter( ReporterConfig const& _config ) + : CumulativeReporterBase( _config ), + xml( _config.stream() ), + unexpectedExceptions( 0 ), + m_okToFail( false ) + { + m_reporterPrefs.shouldRedirectStdOut = true; + } + + virtual ~JunitReporter() CATCH_OVERRIDE; + + static std::string getDescription() { + return "Reports test results in an XML format that looks like Ant's junitreport target"; + } + + virtual void noMatchingTestCases( std::string const& /*spec*/ ) CATCH_OVERRIDE {} + + virtual void testRunStarting( TestRunInfo const& runInfo ) CATCH_OVERRIDE { + CumulativeReporterBase::testRunStarting( runInfo ); + xml.startElement( "testsuites" ); + } + + virtual void testGroupStarting( GroupInfo const& groupInfo ) CATCH_OVERRIDE { + suiteTimer.start(); + stdOutForSuite.str(""); + stdErrForSuite.str(""); + unexpectedExceptions = 0; + CumulativeReporterBase::testGroupStarting( groupInfo ); + } + + virtual void testCaseStarting( TestCaseInfo const& testCaseInfo ) CATCH_OVERRIDE { + m_okToFail = testCaseInfo.okToFail(); + } + virtual bool assertionEnded( AssertionStats const& assertionStats ) CATCH_OVERRIDE { + if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException && !m_okToFail ) + unexpectedExceptions++; + return CumulativeReporterBase::assertionEnded( assertionStats ); + } + + virtual void testCaseEnded( TestCaseStats const& testCaseStats ) CATCH_OVERRIDE { + stdOutForSuite << testCaseStats.stdOut; + stdErrForSuite << testCaseStats.stdErr; + CumulativeReporterBase::testCaseEnded( testCaseStats ); + } + + virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE { + double suiteTime = suiteTimer.getElapsedSeconds(); + CumulativeReporterBase::testGroupEnded( testGroupStats ); + writeGroup( *m_testGroups.back(), suiteTime ); + } + + virtual void testRunEndedCumulative() CATCH_OVERRIDE { + xml.endElement(); + } + + void writeGroup( TestGroupNode const& groupNode, double suiteTime ) { + XmlWriter::ScopedElement e = xml.scopedElement( "testsuite" ); + TestGroupStats const& stats = groupNode.value; + xml.writeAttribute( "name", stats.groupInfo.name ); + xml.writeAttribute( "errors", unexpectedExceptions ); + xml.writeAttribute( "failures", stats.totals.assertions.failed-unexpectedExceptions ); + xml.writeAttribute( "tests", stats.totals.assertions.total() ); + xml.writeAttribute( "hostname", "tbd" ); // !TBD + if( m_config->showDurations() == ShowDurations::Never ) + xml.writeAttribute( "time", "" ); + else + xml.writeAttribute( "time", suiteTime ); + xml.writeAttribute( "timestamp", getCurrentTimestamp() ); + + // Write test cases + for( TestGroupNode::ChildNodes::const_iterator + it = groupNode.children.begin(), itEnd = groupNode.children.end(); + it != itEnd; + ++it ) + writeTestCase( **it ); + + xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite.str() ), false ); + xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite.str() ), false ); + } + + void writeTestCase( TestCaseNode const& testCaseNode ) { + TestCaseStats const& stats = testCaseNode.value; + + // All test cases have exactly one section - which represents the + // test case itself. That section may have 0-n nested sections + assert( testCaseNode.children.size() == 1 ); + SectionNode const& rootSection = *testCaseNode.children.front(); + + std::string className = stats.testInfo.className; + + if( className.empty() ) { + if( rootSection.childSections.empty() ) + className = "global"; + } + writeSection( className, "", rootSection ); + } + + void writeSection( std::string const& className, + std::string const& rootName, + SectionNode const& sectionNode ) { + std::string name = trim( sectionNode.stats.sectionInfo.name ); + if( !rootName.empty() ) + name = rootName + '/' + name; + + if( !sectionNode.assertions.empty() || + !sectionNode.stdOut.empty() || + !sectionNode.stdErr.empty() ) { + XmlWriter::ScopedElement e = xml.scopedElement( "testcase" ); + if( className.empty() ) { + xml.writeAttribute( "classname", name ); + xml.writeAttribute( "name", "root" ); + } + else { + xml.writeAttribute( "classname", className ); + xml.writeAttribute( "name", name ); + } + xml.writeAttribute( "time", Catch::toString( sectionNode.stats.durationInSeconds ) ); + + writeAssertions( sectionNode ); + + if( !sectionNode.stdOut.empty() ) + xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), false ); + if( !sectionNode.stdErr.empty() ) + xml.scopedElement( "system-err" ).writeText( trim( sectionNode.stdErr ), false ); + } + for( SectionNode::ChildSections::const_iterator + it = sectionNode.childSections.begin(), + itEnd = sectionNode.childSections.end(); + it != itEnd; + ++it ) + if( className.empty() ) + writeSection( name, "", **it ); + else + writeSection( className, name, **it ); + } + + void writeAssertions( SectionNode const& sectionNode ) { + for( SectionNode::Assertions::const_iterator + it = sectionNode.assertions.begin(), itEnd = sectionNode.assertions.end(); + it != itEnd; + ++it ) + writeAssertion( *it ); + } + void writeAssertion( AssertionStats const& stats ) { + AssertionResult const& result = stats.assertionResult; + if( !result.isOk() ) { + std::string elementName; + switch( result.getResultType() ) { + case ResultWas::ThrewException: + case ResultWas::FatalErrorCondition: + elementName = "error"; + break; + case ResultWas::ExplicitFailure: + elementName = "failure"; + break; + case ResultWas::ExpressionFailed: + elementName = "failure"; + break; + case ResultWas::DidntThrowException: + elementName = "failure"; + break; + + // We should never see these here: + case ResultWas::Info: + case ResultWas::Warning: + case ResultWas::Ok: + case ResultWas::Unknown: + case ResultWas::FailureBit: + case ResultWas::Exception: + elementName = "internalError"; + break; + } + + XmlWriter::ScopedElement e = xml.scopedElement( elementName ); + + xml.writeAttribute( "message", result.getExpandedExpression() ); + xml.writeAttribute( "type", result.getTestMacroName() ); + + std::ostringstream oss; + if( !result.getMessage().empty() ) + oss << result.getMessage() << '\n'; + for( std::vector::const_iterator + it = stats.infoMessages.begin(), + itEnd = stats.infoMessages.end(); + it != itEnd; + ++it ) + if( it->type == ResultWas::Info ) + oss << it->message << '\n'; + + oss << "at " << result.getSourceInfo(); + xml.writeText( oss.str(), false ); + } + } + + XmlWriter xml; + Timer suiteTimer; + std::ostringstream stdOutForSuite; + std::ostringstream stdErrForSuite; + unsigned int unexpectedExceptions; + bool m_okToFail; + }; + + INTERNAL_CATCH_REGISTER_REPORTER( "junit", JunitReporter ) + +} // end namespace Catch + +// #included from: ../reporters/catch_reporter_console.hpp +#define TWOBLUECUBES_CATCH_REPORTER_CONSOLE_HPP_INCLUDED + +#include +#include + +namespace Catch { + + struct ConsoleReporter : StreamingReporterBase { + ConsoleReporter( ReporterConfig const& _config ) + : StreamingReporterBase( _config ), + m_headerPrinted( false ) + {} + + virtual ~ConsoleReporter() CATCH_OVERRIDE; + static std::string getDescription() { + return "Reports test results as plain lines of text"; + } + + virtual void noMatchingTestCases( std::string const& spec ) CATCH_OVERRIDE { + stream << "No test cases matched '" << spec << '\'' << std::endl; + } + + virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE { + } + + virtual bool assertionEnded( AssertionStats const& _assertionStats ) CATCH_OVERRIDE { + AssertionResult const& result = _assertionStats.assertionResult; + + bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); + + // Drop out if result was successful but we're not printing them. + if( !includeResults && result.getResultType() != ResultWas::Warning ) + return false; + + lazyPrint(); + + AssertionPrinter printer( stream, _assertionStats, includeResults ); + printer.print(); + stream << std::endl; + return true; + } + + virtual void sectionStarting( SectionInfo const& _sectionInfo ) CATCH_OVERRIDE { + m_headerPrinted = false; + StreamingReporterBase::sectionStarting( _sectionInfo ); + } + virtual void sectionEnded( SectionStats const& _sectionStats ) CATCH_OVERRIDE { + if( _sectionStats.missingAssertions ) { + lazyPrint(); + Colour colour( Colour::ResultError ); + if( m_sectionStack.size() > 1 ) + stream << "\nNo assertions in section"; + else + stream << "\nNo assertions in test case"; + stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; + } + if( m_config->showDurations() == ShowDurations::Always ) { + stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + } + if( m_headerPrinted ) { + m_headerPrinted = false; + } + StreamingReporterBase::sectionEnded( _sectionStats ); + } + + virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) CATCH_OVERRIDE { + StreamingReporterBase::testCaseEnded( _testCaseStats ); + m_headerPrinted = false; + } + virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) CATCH_OVERRIDE { + if( currentGroupInfo.used ) { + printSummaryDivider(); + stream << "Summary for group '" << _testGroupStats.groupInfo.name << "':\n"; + printTotals( _testGroupStats.totals ); + stream << '\n' << std::endl; + } + StreamingReporterBase::testGroupEnded( _testGroupStats ); + } + virtual void testRunEnded( TestRunStats const& _testRunStats ) CATCH_OVERRIDE { + printTotalsDivider( _testRunStats.totals ); + printTotals( _testRunStats.totals ); + stream << std::endl; + StreamingReporterBase::testRunEnded( _testRunStats ); + } + + private: + + class AssertionPrinter { + void operator= ( AssertionPrinter const& ); + public: + AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages ) + : stream( _stream ), + stats( _stats ), + result( _stats.assertionResult ), + colour( Colour::None ), + message( result.getMessage() ), + messages( _stats.infoMessages ), + printInfoMessages( _printInfoMessages ) + { + switch( result.getResultType() ) { + case ResultWas::Ok: + colour = Colour::Success; + passOrFail = "PASSED"; + //if( result.hasMessage() ) + if( _stats.infoMessages.size() == 1 ) + messageLabel = "with message"; + if( _stats.infoMessages.size() > 1 ) + messageLabel = "with messages"; + break; + case ResultWas::ExpressionFailed: + if( result.isOk() ) { + colour = Colour::Success; + passOrFail = "FAILED - but was ok"; + } + else { + colour = Colour::Error; + passOrFail = "FAILED"; + } + if( _stats.infoMessages.size() == 1 ) + messageLabel = "with message"; + if( _stats.infoMessages.size() > 1 ) + messageLabel = "with messages"; + break; + case ResultWas::ThrewException: + colour = Colour::Error; + passOrFail = "FAILED"; + messageLabel = "due to unexpected exception with "; + if (_stats.infoMessages.size() == 1) + messageLabel += "message"; + if (_stats.infoMessages.size() > 1) + messageLabel += "messages"; + break; + case ResultWas::FatalErrorCondition: + colour = Colour::Error; + passOrFail = "FAILED"; + messageLabel = "due to a fatal error condition"; + break; + case ResultWas::DidntThrowException: + colour = Colour::Error; + passOrFail = "FAILED"; + messageLabel = "because no exception was thrown where one was expected"; + break; + case ResultWas::Info: + messageLabel = "info"; + break; + case ResultWas::Warning: + messageLabel = "warning"; + break; + case ResultWas::ExplicitFailure: + passOrFail = "FAILED"; + colour = Colour::Error; + if( _stats.infoMessages.size() == 1 ) + messageLabel = "explicitly with message"; + if( _stats.infoMessages.size() > 1 ) + messageLabel = "explicitly with messages"; + break; + // These cases are here to prevent compiler warnings + case ResultWas::Unknown: + case ResultWas::FailureBit: + case ResultWas::Exception: + passOrFail = "** internal error **"; + colour = Colour::Error; + break; + } + } + + void print() const { + printSourceInfo(); + if( stats.totals.assertions.total() > 0 ) { + if( result.isOk() ) + stream << '\n'; + printResultType(); + printOriginalExpression(); + printReconstructedExpression(); + } + else { + stream << '\n'; + } + printMessage(); + } + + private: + void printResultType() const { + if( !passOrFail.empty() ) { + Colour colourGuard( colour ); + stream << passOrFail << ":\n"; + } + } + void printOriginalExpression() const { + if( result.hasExpression() ) { + Colour colourGuard( Colour::OriginalExpression ); + stream << " "; + stream << result.getExpressionInMacro(); + stream << '\n'; + } + } + void printReconstructedExpression() const { + if( result.hasExpandedExpression() ) { + stream << "with expansion:\n"; + Colour colourGuard( Colour::ReconstructedExpression ); + stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << '\n'; + } + } + void printMessage() const { + if( !messageLabel.empty() ) + stream << messageLabel << ':' << '\n'; + for( std::vector::const_iterator it = messages.begin(), itEnd = messages.end(); + it != itEnd; + ++it ) { + // If this assertion is a warning ignore any INFO messages + if( printInfoMessages || it->type != ResultWas::Info ) + stream << Text( it->message, TextAttributes().setIndent(2) ) << '\n'; + } + } + void printSourceInfo() const { + Colour colourGuard( Colour::FileName ); + stream << result.getSourceInfo() << ": "; + } + + std::ostream& stream; + AssertionStats const& stats; + AssertionResult const& result; + Colour::Code colour; + std::string passOrFail; + std::string messageLabel; + std::string message; + std::vector messages; + bool printInfoMessages; + }; + + void lazyPrint() { + + if( !currentTestRunInfo.used ) + lazyPrintRunInfo(); + if( !currentGroupInfo.used ) + lazyPrintGroupInfo(); + + if( !m_headerPrinted ) { + printTestCaseAndSectionHeader(); + m_headerPrinted = true; + } + } + void lazyPrintRunInfo() { + stream << '\n' << getLineOfChars<'~'>() << '\n'; + Colour colour( Colour::SecondaryText ); + stream << currentTestRunInfo->name + << " is a Catch v" << libraryVersion() << " host application.\n" + << "Run with -? for options\n\n"; + + if( m_config->rngSeed() != 0 ) + stream << "Randomness seeded to: " << m_config->rngSeed() << "\n\n"; + + currentTestRunInfo.used = true; + } + void lazyPrintGroupInfo() { + if( !currentGroupInfo->name.empty() && currentGroupInfo->groupsCounts > 1 ) { + printClosedHeader( "Group: " + currentGroupInfo->name ); + currentGroupInfo.used = true; + } + } + void printTestCaseAndSectionHeader() { + assert( !m_sectionStack.empty() ); + printOpenHeader( currentTestCaseInfo->name ); + + if( m_sectionStack.size() > 1 ) { + Colour colourGuard( Colour::Headers ); + + std::vector::const_iterator + it = m_sectionStack.begin()+1, // Skip first section (test case) + itEnd = m_sectionStack.end(); + for( ; it != itEnd; ++it ) + printHeaderString( it->name, 2 ); + } + + SourceLineInfo lineInfo = m_sectionStack.back().lineInfo; + + if( !lineInfo.empty() ){ + stream << getLineOfChars<'-'>() << '\n'; + Colour colourGuard( Colour::FileName ); + stream << lineInfo << '\n'; + } + stream << getLineOfChars<'.'>() << '\n' << std::endl; + } + + void printClosedHeader( std::string const& _name ) { + printOpenHeader( _name ); + stream << getLineOfChars<'.'>() << '\n'; + } + void printOpenHeader( std::string const& _name ) { + stream << getLineOfChars<'-'>() << '\n'; + { + Colour colourGuard( Colour::Headers ); + printHeaderString( _name ); + } + } + + // if string has a : in first line will set indent to follow it on + // subsequent lines + void printHeaderString( std::string const& _string, std::size_t indent = 0 ) { + std::size_t i = _string.find( ": " ); + if( i != std::string::npos ) + i+=2; + else + i = 0; + stream << Text( _string, TextAttributes() + .setIndent( indent+i) + .setInitialIndent( indent ) ) << '\n'; + } + + struct SummaryColumn { + + SummaryColumn( std::string const& _label, Colour::Code _colour ) + : label( _label ), + colour( _colour ) + {} + SummaryColumn addRow( std::size_t count ) { + std::ostringstream oss; + oss << count; + std::string row = oss.str(); + for( std::vector::iterator it = rows.begin(); it != rows.end(); ++it ) { + while( it->size() < row.size() ) + *it = ' ' + *it; + while( it->size() > row.size() ) + row = ' ' + row; + } + rows.push_back( row ); + return *this; + } + + std::string label; + Colour::Code colour; + std::vector rows; + + }; + + void printTotals( Totals const& totals ) { + if( totals.testCases.total() == 0 ) { + stream << Colour( Colour::Warning ) << "No tests ran\n"; + } + else if( totals.assertions.total() > 0 && totals.testCases.allPassed() ) { + stream << Colour( Colour::ResultSuccess ) << "All tests passed"; + stream << " (" + << pluralise( totals.assertions.passed, "assertion" ) << " in " + << pluralise( totals.testCases.passed, "test case" ) << ')' + << '\n'; + } + else { + + std::vector columns; + columns.push_back( SummaryColumn( "", Colour::None ) + .addRow( totals.testCases.total() ) + .addRow( totals.assertions.total() ) ); + columns.push_back( SummaryColumn( "passed", Colour::Success ) + .addRow( totals.testCases.passed ) + .addRow( totals.assertions.passed ) ); + columns.push_back( SummaryColumn( "failed", Colour::ResultError ) + .addRow( totals.testCases.failed ) + .addRow( totals.assertions.failed ) ); + columns.push_back( SummaryColumn( "failed as expected", Colour::ResultExpectedFailure ) + .addRow( totals.testCases.failedButOk ) + .addRow( totals.assertions.failedButOk ) ); + + printSummaryRow( "test cases", columns, 0 ); + printSummaryRow( "assertions", columns, 1 ); + } + } + void printSummaryRow( std::string const& label, std::vector const& cols, std::size_t row ) { + for( std::vector::const_iterator it = cols.begin(); it != cols.end(); ++it ) { + std::string value = it->rows[row]; + if( it->label.empty() ) { + stream << label << ": "; + if( value != "0" ) + stream << value; + else + stream << Colour( Colour::Warning ) << "- none -"; + } + else if( value != "0" ) { + stream << Colour( Colour::LightGrey ) << " | "; + stream << Colour( it->colour ) + << value << ' ' << it->label; + } + } + stream << '\n'; + } + + static std::size_t makeRatio( std::size_t number, std::size_t total ) { + std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number/ total : 0; + return ( ratio == 0 && number > 0 ) ? 1 : ratio; + } + static std::size_t& findMax( std::size_t& i, std::size_t& j, std::size_t& k ) { + if( i > j && i > k ) + return i; + else if( j > k ) + return j; + else + return k; + } + + void printTotalsDivider( Totals const& totals ) { + if( totals.testCases.total() > 0 ) { + std::size_t failedRatio = makeRatio( totals.testCases.failed, totals.testCases.total() ); + std::size_t failedButOkRatio = makeRatio( totals.testCases.failedButOk, totals.testCases.total() ); + std::size_t passedRatio = makeRatio( totals.testCases.passed, totals.testCases.total() ); + while( failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH-1 ) + findMax( failedRatio, failedButOkRatio, passedRatio )++; + while( failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH-1 ) + findMax( failedRatio, failedButOkRatio, passedRatio )--; + + stream << Colour( Colour::Error ) << std::string( failedRatio, '=' ); + stream << Colour( Colour::ResultExpectedFailure ) << std::string( failedButOkRatio, '=' ); + if( totals.testCases.allPassed() ) + stream << Colour( Colour::ResultSuccess ) << std::string( passedRatio, '=' ); + else + stream << Colour( Colour::Success ) << std::string( passedRatio, '=' ); + } + else { + stream << Colour( Colour::Warning ) << std::string( CATCH_CONFIG_CONSOLE_WIDTH-1, '=' ); + } + stream << '\n'; + } + void printSummaryDivider() { + stream << getLineOfChars<'-'>() << '\n'; + } + + private: + bool m_headerPrinted; + }; + + INTERNAL_CATCH_REGISTER_REPORTER( "console", ConsoleReporter ) + +} // end namespace Catch + +// #included from: ../reporters/catch_reporter_compact.hpp +#define TWOBLUECUBES_CATCH_REPORTER_COMPACT_HPP_INCLUDED + +namespace Catch { + + struct CompactReporter : StreamingReporterBase { + + CompactReporter( ReporterConfig const& _config ) + : StreamingReporterBase( _config ) + {} + + virtual ~CompactReporter(); + + static std::string getDescription() { + return "Reports test results on a single line, suitable for IDEs"; + } + + virtual ReporterPreferences getPreferences() const { + ReporterPreferences prefs; + prefs.shouldRedirectStdOut = false; + return prefs; + } + + virtual void noMatchingTestCases( std::string const& spec ) { + stream << "No test cases matched '" << spec << '\'' << std::endl; + } + + virtual void assertionStarting( AssertionInfo const& ) {} + + virtual bool assertionEnded( AssertionStats const& _assertionStats ) { + AssertionResult const& result = _assertionStats.assertionResult; + + bool printInfoMessages = true; + + // Drop out if result was successful and we're not printing those + if( !m_config->includeSuccessfulResults() && result.isOk() ) { + if( result.getResultType() != ResultWas::Warning ) + return false; + printInfoMessages = false; + } + + AssertionPrinter printer( stream, _assertionStats, printInfoMessages ); + printer.print(); + + stream << std::endl; + return true; + } + + virtual void sectionEnded(SectionStats const& _sectionStats) CATCH_OVERRIDE { + if (m_config->showDurations() == ShowDurations::Always) { + stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; + } + } + + virtual void testRunEnded( TestRunStats const& _testRunStats ) { + printTotals( _testRunStats.totals ); + stream << '\n' << std::endl; + StreamingReporterBase::testRunEnded( _testRunStats ); + } + + private: + class AssertionPrinter { + void operator= ( AssertionPrinter const& ); + public: + AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages ) + : stream( _stream ) + , stats( _stats ) + , result( _stats.assertionResult ) + , messages( _stats.infoMessages ) + , itMessage( _stats.infoMessages.begin() ) + , printInfoMessages( _printInfoMessages ) + {} + + void print() { + printSourceInfo(); + + itMessage = messages.begin(); + + switch( result.getResultType() ) { + case ResultWas::Ok: + printResultType( Colour::ResultSuccess, passedString() ); + printOriginalExpression(); + printReconstructedExpression(); + if ( ! result.hasExpression() ) + printRemainingMessages( Colour::None ); + else + printRemainingMessages(); + break; + case ResultWas::ExpressionFailed: + if( result.isOk() ) + printResultType( Colour::ResultSuccess, failedString() + std::string( " - but was ok" ) ); + else + printResultType( Colour::Error, failedString() ); + printOriginalExpression(); + printReconstructedExpression(); + printRemainingMessages(); + break; + case ResultWas::ThrewException: + printResultType( Colour::Error, failedString() ); + printIssue( "unexpected exception with message:" ); + printMessage(); + printExpressionWas(); + printRemainingMessages(); + break; + case ResultWas::FatalErrorCondition: + printResultType( Colour::Error, failedString() ); + printIssue( "fatal error condition with message:" ); + printMessage(); + printExpressionWas(); + printRemainingMessages(); + break; + case ResultWas::DidntThrowException: + printResultType( Colour::Error, failedString() ); + printIssue( "expected exception, got none" ); + printExpressionWas(); + printRemainingMessages(); + break; + case ResultWas::Info: + printResultType( Colour::None, "info" ); + printMessage(); + printRemainingMessages(); + break; + case ResultWas::Warning: + printResultType( Colour::None, "warning" ); + printMessage(); + printRemainingMessages(); + break; + case ResultWas::ExplicitFailure: + printResultType( Colour::Error, failedString() ); + printIssue( "explicitly" ); + printRemainingMessages( Colour::None ); + break; + // These cases are here to prevent compiler warnings + case ResultWas::Unknown: + case ResultWas::FailureBit: + case ResultWas::Exception: + printResultType( Colour::Error, "** internal error **" ); + break; + } + } + + private: + // Colour::LightGrey + + static Colour::Code dimColour() { return Colour::FileName; } + +#ifdef CATCH_PLATFORM_MAC + static const char* failedString() { return "FAILED"; } + static const char* passedString() { return "PASSED"; } +#else + static const char* failedString() { return "failed"; } + static const char* passedString() { return "passed"; } +#endif + + void printSourceInfo() const { + Colour colourGuard( Colour::FileName ); + stream << result.getSourceInfo() << ':'; + } + + void printResultType( Colour::Code colour, std::string const& passOrFail ) const { + if( !passOrFail.empty() ) { + { + Colour colourGuard( colour ); + stream << ' ' << passOrFail; + } + stream << ':'; + } + } + + void printIssue( std::string const& issue ) const { + stream << ' ' << issue; + } + + void printExpressionWas() { + if( result.hasExpression() ) { + stream << ';'; + { + Colour colour( dimColour() ); + stream << " expression was:"; + } + printOriginalExpression(); + } + } + + void printOriginalExpression() const { + if( result.hasExpression() ) { + stream << ' ' << result.getExpression(); + } + } + + void printReconstructedExpression() const { + if( result.hasExpandedExpression() ) { + { + Colour colour( dimColour() ); + stream << " for: "; + } + stream << result.getExpandedExpression(); + } + } + + void printMessage() { + if ( itMessage != messages.end() ) { + stream << " '" << itMessage->message << '\''; + ++itMessage; + } + } + + void printRemainingMessages( Colour::Code colour = dimColour() ) { + if ( itMessage == messages.end() ) + return; + + // using messages.end() directly yields compilation error: + std::vector::const_iterator itEnd = messages.end(); + const std::size_t N = static_cast( std::distance( itMessage, itEnd ) ); + + { + Colour colourGuard( colour ); + stream << " with " << pluralise( N, "message" ) << ':'; + } + + for(; itMessage != itEnd; ) { + // If this assertion is a warning ignore any INFO messages + if( printInfoMessages || itMessage->type != ResultWas::Info ) { + stream << " '" << itMessage->message << '\''; + if ( ++itMessage != itEnd ) { + Colour colourGuard( dimColour() ); + stream << " and"; + } + } + } + } + + private: + std::ostream& stream; + AssertionStats const& stats; + AssertionResult const& result; + std::vector messages; + std::vector::const_iterator itMessage; + bool printInfoMessages; + }; + + // Colour, message variants: + // - white: No tests ran. + // - red: Failed [both/all] N test cases, failed [both/all] M assertions. + // - white: Passed [both/all] N test cases (no assertions). + // - red: Failed N tests cases, failed M assertions. + // - green: Passed [both/all] N tests cases with M assertions. + + std::string bothOrAll( std::size_t count ) const { + return count == 1 ? std::string() : count == 2 ? "both " : "all " ; + } + + void printTotals( const Totals& totals ) const { + if( totals.testCases.total() == 0 ) { + stream << "No tests ran."; + } + else if( totals.testCases.failed == totals.testCases.total() ) { + Colour colour( Colour::ResultError ); + const std::string qualify_assertions_failed = + totals.assertions.failed == totals.assertions.total() ? + bothOrAll( totals.assertions.failed ) : std::string(); + stream << + "Failed " << bothOrAll( totals.testCases.failed ) + << pluralise( totals.testCases.failed, "test case" ) << ", " + "failed " << qualify_assertions_failed << + pluralise( totals.assertions.failed, "assertion" ) << '.'; + } + else if( totals.assertions.total() == 0 ) { + stream << + "Passed " << bothOrAll( totals.testCases.total() ) + << pluralise( totals.testCases.total(), "test case" ) + << " (no assertions)."; + } + else if( totals.assertions.failed ) { + Colour colour( Colour::ResultError ); + stream << + "Failed " << pluralise( totals.testCases.failed, "test case" ) << ", " + "failed " << pluralise( totals.assertions.failed, "assertion" ) << '.'; + } + else { + Colour colour( Colour::ResultSuccess ); + stream << + "Passed " << bothOrAll( totals.testCases.passed ) + << pluralise( totals.testCases.passed, "test case" ) << + " with " << pluralise( totals.assertions.passed, "assertion" ) << '.'; + } + } + }; + + INTERNAL_CATCH_REGISTER_REPORTER( "compact", CompactReporter ) + +} // end namespace Catch + +namespace Catch { + // These are all here to avoid warnings about not having any out of line + // virtual methods + NonCopyable::~NonCopyable() {} + IShared::~IShared() {} + IStream::~IStream() CATCH_NOEXCEPT {} + FileStream::~FileStream() CATCH_NOEXCEPT {} + CoutStream::~CoutStream() CATCH_NOEXCEPT {} + DebugOutStream::~DebugOutStream() CATCH_NOEXCEPT {} + StreamBufBase::~StreamBufBase() CATCH_NOEXCEPT {} + IContext::~IContext() {} + IResultCapture::~IResultCapture() {} + ITestCase::~ITestCase() {} + ITestCaseRegistry::~ITestCaseRegistry() {} + IRegistryHub::~IRegistryHub() {} + IMutableRegistryHub::~IMutableRegistryHub() {} + IExceptionTranslator::~IExceptionTranslator() {} + IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() {} + IReporter::~IReporter() {} + IReporterFactory::~IReporterFactory() {} + IReporterRegistry::~IReporterRegistry() {} + IStreamingReporter::~IStreamingReporter() {} + AssertionStats::~AssertionStats() {} + SectionStats::~SectionStats() {} + TestCaseStats::~TestCaseStats() {} + TestGroupStats::~TestGroupStats() {} + TestRunStats::~TestRunStats() {} + CumulativeReporterBase::SectionNode::~SectionNode() {} + CumulativeReporterBase::~CumulativeReporterBase() {} + + StreamingReporterBase::~StreamingReporterBase() {} + ConsoleReporter::~ConsoleReporter() {} + CompactReporter::~CompactReporter() {} + IRunner::~IRunner() {} + IMutableContext::~IMutableContext() {} + IConfig::~IConfig() {} + XmlReporter::~XmlReporter() {} + JunitReporter::~JunitReporter() {} + TestRegistry::~TestRegistry() {} + FreeFunctionTestCase::~FreeFunctionTestCase() {} + IGeneratorInfo::~IGeneratorInfo() {} + IGeneratorsForTest::~IGeneratorsForTest() {} + WildcardPattern::~WildcardPattern() {} + TestSpec::Pattern::~Pattern() {} + TestSpec::NamePattern::~NamePattern() {} + TestSpec::TagPattern::~TagPattern() {} + TestSpec::ExcludedPattern::~ExcludedPattern() {} + Matchers::Impl::MatcherUntypedBase::~MatcherUntypedBase() {} + + void Config::dummy() {} + + namespace TestCaseTracking { + ITracker::~ITracker() {} + TrackerBase::~TrackerBase() {} + SectionTracker::~SectionTracker() {} + IndexTracker::~IndexTracker() {} + } +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#endif + +#ifdef CATCH_CONFIG_MAIN +// #included from: internal/catch_default_main.hpp +#define TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED + +#ifndef __OBJC__ + +#if defined(WIN32) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) +// Standard C/C++ Win32 Unicode wmain entry point +extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { +#else +// Standard C/C++ main entry point +int main (int argc, char * argv[]) { +#endif + + int result = Catch::Session().run( argc, argv ); + return ( result < 0xff ? result : 0xff ); +} + +#else // __OBJC__ + +// Objective-C entry point +int main (int argc, char * const argv[]) { +#if !CATCH_ARC_ENABLED + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; +#endif + + Catch::registerTestMethods(); + int result = Catch::Session().run( argc, (char* const*)argv ); + +#if !CATCH_ARC_ENABLED + [pool drain]; +#endif + + return ( result < 0xff ? result : 0xff ); +} + +#endif // __OBJC__ + +#endif + +#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED +# undef CLARA_CONFIG_MAIN +#endif + +////// + +// If this config identifier is defined then all CATCH macros are prefixed with CATCH_ +#ifdef CATCH_CONFIG_PREFIX_ALL + +#if defined(CATCH_CONFIG_FAST_COMPILE) +#define CATCH_REQUIRE( expr ) INTERNAL_CATCH_TEST_NO_TRY( "CATCH_REQUIRE", Catch::ResultDisposition::Normal, expr ) +#define CATCH_REQUIRE_FALSE( expr ) INTERNAL_CATCH_TEST_NO_TRY( "CATCH_REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, expr ) +#else +#define CATCH_REQUIRE( expr ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE", Catch::ResultDisposition::Normal, expr ) +#define CATCH_REQUIRE_FALSE( expr ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, expr ) +#endif + +#define CATCH_REQUIRE_THROWS( expr ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS", Catch::ResultDisposition::Normal, "", expr ) +#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) +#define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr ) +#define CATCH_REQUIRE_NOTHROW( expr ) INTERNAL_CATCH_NO_THROW( "CATCH_REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, expr ) + +#define CATCH_CHECK( expr ) INTERNAL_CATCH_TEST( "CATCH_CHECK", Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CATCH_CHECK_FALSE( expr ) INTERNAL_CATCH_TEST( "CATCH_CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, expr ) +#define CATCH_CHECKED_IF( expr ) INTERNAL_CATCH_IF( "CATCH_CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CATCH_CHECKED_ELSE( expr ) INTERNAL_CATCH_ELSE( "CATCH_CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CATCH_CHECK_NOFAIL( expr ) INTERNAL_CATCH_TEST( "CATCH_CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, expr ) + +#define CATCH_CHECK_THROWS( expr ) INTERNAL_CATCH_THROWS( "CATCH_CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, "", expr ) +#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS( "CATCH_CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) +#define CATCH_CHECK_NOTHROW( expr ) INTERNAL_CATCH_NO_THROW( "CATCH_CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, expr ) + +#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg ) + +#if defined(CATCH_CONFIG_FAST_COMPILE) +#define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT_NO_TRY( "CATCH_REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) +#else +#define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) +#endif + +#define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg ) +#define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) +#define CATCH_SCOPED_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg ) +#define CATCH_CAPTURE( msg ) INTERNAL_CATCH_INFO( "CATCH_CAPTURE", #msg " := " << Catch::toString(msg) ) +#define CATCH_SCOPED_CAPTURE( msg ) INTERNAL_CATCH_INFO( "CATCH_CAPTURE", #msg " := " << Catch::toString(msg) ) + +#ifdef CATCH_CONFIG_VARIADIC_MACROS + #define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) + #define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) + #define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) + #define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) + #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) +#else + #define CATCH_TEST_CASE( name, description ) INTERNAL_CATCH_TESTCASE( name, description ) + #define CATCH_TEST_CASE_METHOD( className, name, description ) INTERNAL_CATCH_TEST_CASE_METHOD( className, name, description ) + #define CATCH_METHOD_AS_TEST_CASE( method, name, description ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, name, description ) + #define CATCH_REGISTER_TEST_CASE( function, name, description ) INTERNAL_CATCH_REGISTER_TESTCASE( function, name, description ) + #define CATCH_SECTION( name, description ) INTERNAL_CATCH_SECTION( name, description ) + #define CATCH_FAIL( msg ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, msg ) + #define CATCH_FAIL_CHECK( msg ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, msg ) + #define CATCH_SUCCEED( msg ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, msg ) +#endif +#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE( "", "" ) + +#define CATCH_REGISTER_REPORTER( name, reporterType ) INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType ) +#define CATCH_REGISTER_LEGACY_REPORTER( name, reporterType ) INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( name, reporterType ) + +#define CATCH_GENERATE( expr) INTERNAL_CATCH_GENERATE( expr ) + +// "BDD-style" convenience wrappers +#ifdef CATCH_CONFIG_VARIADIC_MACROS +#define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( "Scenario: " __VA_ARGS__ ) +#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) +#else +#define CATCH_SCENARIO( name, tags ) CATCH_TEST_CASE( "Scenario: " name, tags ) +#define CATCH_SCENARIO_METHOD( className, name, tags ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " name, tags ) +#endif +#define CATCH_GIVEN( desc ) CATCH_SECTION( std::string( "Given: ") + desc, "" ) +#define CATCH_WHEN( desc ) CATCH_SECTION( std::string( " When: ") + desc, "" ) +#define CATCH_AND_WHEN( desc ) CATCH_SECTION( std::string( " And: ") + desc, "" ) +#define CATCH_THEN( desc ) CATCH_SECTION( std::string( " Then: ") + desc, "" ) +#define CATCH_AND_THEN( desc ) CATCH_SECTION( std::string( " And: ") + desc, "" ) + +// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required +#else + +#if defined(CATCH_CONFIG_FAST_COMPILE) +#define REQUIRE( expr ) INTERNAL_CATCH_TEST_NO_TRY( "REQUIRE", Catch::ResultDisposition::Normal, expr ) +#define REQUIRE_FALSE( expr ) INTERNAL_CATCH_TEST_NO_TRY( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, expr ) + +#else +#define REQUIRE( expr ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, expr ) +#define REQUIRE_FALSE( expr ) INTERNAL_CATCH_TEST( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, expr ) +#endif + +#define REQUIRE_THROWS( expr ) INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, "", expr ) +#define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) +#define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS( "REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr ) +#define REQUIRE_NOTHROW( expr ) INTERNAL_CATCH_NO_THROW( "REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, expr ) + +#define CHECK( expr ) INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CHECK_FALSE( expr ) INTERNAL_CATCH_TEST( "CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, expr ) +#define CHECKED_IF( expr ) INTERNAL_CATCH_IF( "CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CHECKED_ELSE( expr ) INTERNAL_CATCH_ELSE( "CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CHECK_NOFAIL( expr ) INTERNAL_CATCH_TEST( "CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, expr ) + +#define CHECK_THROWS( expr ) INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, "", expr ) +#define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) +#define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS( "CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) +#define CHECK_NOTHROW( expr ) INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, expr ) + +#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg ) + +#if defined(CATCH_CONFIG_FAST_COMPILE) +#define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT_NO_TRY( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) +#else +#define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) +#endif + +#define INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg ) +#define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) +#define SCOPED_INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg ) +#define CAPTURE( msg ) INTERNAL_CATCH_INFO( "CAPTURE", #msg " := " << Catch::toString(msg) ) +#define SCOPED_CAPTURE( msg ) INTERNAL_CATCH_INFO( "CAPTURE", #msg " := " << Catch::toString(msg) ) + +#ifdef CATCH_CONFIG_VARIADIC_MACROS +#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) +#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) +#define METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) +#define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) +#define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) +#define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) +#define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) +#define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) +#else +#define TEST_CASE( name, description ) INTERNAL_CATCH_TESTCASE( name, description ) + #define TEST_CASE_METHOD( className, name, description ) INTERNAL_CATCH_TEST_CASE_METHOD( className, name, description ) + #define METHOD_AS_TEST_CASE( method, name, description ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, name, description ) + #define REGISTER_TEST_CASE( method, name, description ) INTERNAL_CATCH_REGISTER_TESTCASE( method, name, description ) + #define SECTION( name, description ) INTERNAL_CATCH_SECTION( name, description ) + #define FAIL( msg ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, msg ) + #define FAIL_CHECK( msg ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, msg ) + #define SUCCEED( msg ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, msg ) +#endif +#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE( "", "" ) + +#define REGISTER_REPORTER( name, reporterType ) INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType ) +#define REGISTER_LEGACY_REPORTER( name, reporterType ) INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( name, reporterType ) + +#define GENERATE( expr) INTERNAL_CATCH_GENERATE( expr ) + +#endif + +#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) + +// "BDD-style" convenience wrappers +#ifdef CATCH_CONFIG_VARIADIC_MACROS +#define SCENARIO( ... ) TEST_CASE( "Scenario: " __VA_ARGS__ ) +#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) +#else +#define SCENARIO( name, tags ) TEST_CASE( "Scenario: " name, tags ) +#define SCENARIO_METHOD( className, name, tags ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " name, tags ) +#endif +#define GIVEN( desc ) SECTION( std::string(" Given: ") + desc, "" ) +#define WHEN( desc ) SECTION( std::string(" When: ") + desc, "" ) +#define AND_WHEN( desc ) SECTION( std::string("And when: ") + desc, "" ) +#define THEN( desc ) SECTION( std::string(" Then: ") + desc, "" ) +#define AND_THEN( desc ) SECTION( std::string(" And: ") + desc, "" ) + +using Catch::Detail::Approx; + +// #included from: internal/catch_reenable_warnings.h + +#define TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED + +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# pragma warning(pop) +# else +# pragma clang diagnostic pop +# endif +#elif defined __GNUC__ +# pragma GCC diagnostic pop +#endif + +#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED + diff --git a/contrib/shunit2-2.0.3/Makefile b/contrib/shunit2-2.0.3/Makefile new file mode 100644 index 0000000..effbcca --- /dev/null +++ b/contrib/shunit2-2.0.3/Makefile @@ -0,0 +1,89 @@ +# $Id$ + +PROG=shunit2 + +BIN_DIR=$(PWD)/bin +BUILD_DIR=$(PWD)/build +DIST_DIR=$(PWD)/dist +LIB_DIR=$(PWD)/lib +SHARE_DIR=$(PWD)/share +SRC_DIR=$(PWD)/src +TEST_DIR=$(PWD)/test +TMP_DIR=$(PWD)/tmp + +DOCBOOK_BUILD_DIR=$(BUILD_DIR)/docbook +DOCBOOK_SHARE_DIR=$(SHARE_DIR)/docbook + +DOCBOOK_SRC_DIR=$(SRC_DIR)/docbook +EXAMPLES_SRC_DIR=$(SRC_DIR)/examples +SHELL_SRC_DIR=$(SRC_DIR)/shell +TEST_SRC_DIR=$(SRC_DIR)/test + +HTML_XSL=$(SHARE_DIR)/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl + +all: build docs + +build: build-prep + cp -p $(SHELL_SRC_DIR)/$(PROG) $(BUILD_DIR) + +build-clean: + rm -fr $(BUILD_DIR) + +build-prep: + @mkdir -p $(BUILD_DIR) + +docs: docs-transform-shelldoc docs-transform-docbook + +docs-prep: + @mkdir -p $(DOCBOOK_BUILD_DIR) + @echo "Preparing documentation for parsing" + @isoDate=`date "+%Y-%m-%d"`; \ + find $(DOCBOOK_SRC_DIR) -name "*.xml" |\ + while read f; do \ + bn=`basename $$f`; \ + sed -e "s/@@ISO_DATE@@/$$isoDate/g" $$f >$(DOCBOOK_BUILD_DIR)/$$bn; \ + done + +docs-extract-shelldoc: docs-prep + @echo "Extracting the ShellDoc" + @$(BIN_DIR)/extractDocs.pl $(SHELL_SRC_DIR)/$(PROG) >$(BUILD_DIR)/$(PROG)_shelldoc.xml + +docs-transform-shelldoc: docs-prep docs-extract-shelldoc + @echo "Parsing the extracted ShellDoc" + @xsltproc $(SHARE_DIR)/resources/shelldoc.xslt $(BUILD_DIR)/$(PROG)_shelldoc.xml >$(DOCBOOK_BUILD_DIR)/functions.xml + +docs-transform-docbook: docs-docbook-prep docs-prep + @echo "Parsing the documentation with DocBook" + @xsltproc $(HTML_XSL) $(DOCBOOK_BUILD_DIR)/$(PROG).xml >$(BUILD_DIR)/$(PROG).html + +docs-docbook-prep: + @if [ ! -d "$(DOCBOOK_SHARE_DIR)/docbook-xml" \ + -o ! -d "$(DOCBOOK_SHARE_DIR)/docbook-xsl" ]; \ + then \ + echo "Preparing DocBook structure"; \ + $(BIN_DIR)/docbookPrep.sh "$(DOCBOOK_SHARE_DIR)"; \ + fi + +test: test-prep + @echo "executing $(PROG) unit tests" + ( cd $(TEST_DIR); $(TEST_SRC_DIR)/run-test-suite ) + +test-clean: + rm -fr $(TEST_DIR) + +test-prep: build test-clean + @mkdir -p $(TEST_DIR) + cp -p $(TEST_SRC_DIR)/test* $(TEST_DIR) + cp -p $(TEST_SRC_DIR)/run-test-suite $(TEST_DIR) + cp -p $(BUILD_DIR)/$(PROG) $(TEST_DIR) + +dist: dist-clean build docs + @mkdir $(DIST_DIR) + cp -p $(BUILD_DIR)/$(PROG) $(DIST_DIR) + cp -p $(BUILD_DIR)/$(PROG).html $(DIST_DIR) + +clean: build-clean test-clean + rm -fr $(TMP_DIR) + +dist-clean: clean + rm -fr $(DIST_DIR) diff --git a/contrib/shunit2-2.0.3/bin/docbookPrep.sh b/contrib/shunit2-2.0.3/bin/docbookPrep.sh new file mode 100755 index 0000000..eb7c270 --- /dev/null +++ b/contrib/shunit2-2.0.3/bin/docbookPrep.sh @@ -0,0 +1,97 @@ +#! /bin/sh +# $Id$ + +XML_VERSION='4.4' +XML_FILE="docbook-xml-${XML_VERSION}" +XML_URL="http://www.docbook.org/xml/${XML_VERSION}/${XML_FILE}.zip" + +XSL_VERSION='1.72.0' +XSL_FILE="docbook-xsl-${XSL_VERSION}" +XSL_URL="http://downloads.sourceforge.net/docbook/${XSL_FILE}.tar.bz2" + +#----------------------------------------------------------------------------- +# do no edit below here +#----------------------------------------------------------------------------- + +PATH="${PATH}:${MY_DIR}" +PWD=${PWD:-`pwd`} + +MY_BASE=`basename "$0"` +MY_DIR=`dirname "$0"` + +# load shlib +. "${MY_DIR}/../lib/sh/shlib" + +BASE_DIR=`shlib_relToAbsPath "${MY_DIR}/.."` +DL_DIR="${BASE_DIR}/tmp" +DOCBOOK_DIR="${BASE_DIR}/share/docbook" + +CURL_OPTS='-C - -Os' +WGET_OPTS='-cq' + +METHOD_NONE=0 +METHOD_WGET=1 +METHOD_CURL=2 + +get_url() +{ + url=$1 + case ${method} in + ${METHOD_CURL}) ${curl} ${CURL_OPTS} "${url}" ;; + ${METHOD_WGET}) ${wget} ${WGET_OPTS} "${url}" ;; + esac +} + +# determine method +method=${METHOD_NONE} +wget=`which wget` +[ $? -eq 0 ] && method=${METHOD_WGET} +curl=`which curl` +[ $? -eq 0 -a ${method} -eq ${METHOD_NONE} ] && method=${METHOD_CURL} +if [ ${method} -eq ${METHOD_NONE} ]; then + echo "unable to locate wget or curl. cannot continue" + exit 1 +fi + +# create download dir +mkdir -p "${DL_DIR}" + +# get the docbook xml files +echo 'Docbook XML' +echo ' downloading' +cd ${DL_DIR} +get_url "${XML_URL}" +if [ -f "${DL_DIR}/${XML_FILE}.zip" ]; then + echo ' extracting' + xml_dir="${DOCBOOK_DIR}/docbook-xml/${XML_VERSION}" + rm -fr "${xml_dir}" + mkdir -p "${xml_dir}" + cd "${xml_dir}" + unzip -oq "${DL_DIR}/${XML_FILE}.zip" + cd .. + rm -f current + ln -s "${XML_VERSION}" current +else + echo "error: unable to extract (${XML_FILE}.zip)" >&2 + exit 1 +fi + +# get the docbook xslt files +echo 'Docbook XSLT' +echo ' downloading' +cd ${DL_DIR} +get_url "${XSL_URL}" +if [ -f "${DL_DIR}/${XSL_FILE}.tar.bz2" ]; then + echo ' extracting' + xsl_dir="${DOCBOOK_DIR}/docbook-xsl" + mkdir -p "${xsl_dir}" + cd "${xsl_dir}" + rm -fr ${XSL_VERSION} + bzip2 -dc "${DL_DIR}/${XSL_FILE}.tar.bz2" |tar xf - + mv ${XSL_FILE} ${XSL_VERSION} + rm -f current + ln -s "${XSL_VERSION}" current +else + echo "error: unable to extract (${XSL_FILE}.tar.bz2)" >&2 + exit 1 +fi diff --git a/contrib/shunit2-2.0.3/bin/extractDocs.pl b/contrib/shunit2-2.0.3/bin/extractDocs.pl new file mode 100755 index 0000000..a803526 --- /dev/null +++ b/contrib/shunit2-2.0.3/bin/extractDocs.pl @@ -0,0 +1,40 @@ +#! /usr/bin/perl +# $Id$ + +if(@ARGV != 1) { + print "usage: $0 sourceFile\n"; + exit; +} + +$sourceFile = $ARGV[0]; + +# +# read in the source file +# +$rslt = open(FILE, $sourceFile) + || die "could not open file ($sourceFile)"; + +$inComment = 0; +while() { + next if /^[^#]/; + s/^# //; + s/^#//; + + if(/^\/\*\*/) { + $inComment = 1; + next; + } + if(/\*\/$/) { + $inComment = 0; + next; + } + + if ($inComment == 1) { print $_ }; + if ($inComment == 0 && /\/\/\*/) { + @line = split /\/\/\*/, $_, 2; + $line[1] =~ s/^ //; + print $line[1]; + } +} + +close(FILE); diff --git a/contrib/shunit2-2.0.3/bin/which b/contrib/shunit2-2.0.3/bin/which new file mode 100755 index 0000000..9d7cc9f --- /dev/null +++ b/contrib/shunit2-2.0.3/bin/which @@ -0,0 +1,36 @@ +#! /bin/sh +# $Id$ +# +# This is a simple implementation of the 'which' command for those OSes that +# don't have one. +# + +true; TRUE=$? +false; FALSE=$? + +showAll=${FALSE} + +# process command line flags +while getopts 'a' opt; do + case ${opt} in + a) showAll=${TRUE} + esac +done +shift `expr ${OPTIND} - 1` + +# exit if no arguments were given +[ $# -eq 0 ] && exit 1 + +command=$1 + +# search for command +out=`echo "${PATH}" |sed "s/:/\n/g" |\ +while read path; do + fullPath="${path}/${command}" + if [ -x "${fullPath}" ]; then + echo "${fullPath}" + [ ${showAll} -eq ${FALSE} ] && break + fi +done` +[ -z "${out}" ] && exit 1 +echo "${out}" diff --git a/contrib/shunit2-2.0.3/doc/CHANGES-2.0.txt b/contrib/shunit2-2.0.3/doc/CHANGES-2.0.txt new file mode 100644 index 0000000..97ea3db --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/CHANGES-2.0.txt @@ -0,0 +1,68 @@ +CHANGES WITH 2.0.4 + +Unset additional variables that were missed. + +Fixed off-by-one in exit value for scripts caught by the trap handler. + +The library did not fail gracefully when the 'od' command was not installed. + + +CHANGES WITH 2.0.3 + +Back ported the Makefile from 2.1.1pre that included changes to the +docs-docbook-prep target. + +Changed the test in assertFalse() so that any non-zero value registers as +false. (Credits to Bryan Larsen) + +Updated the testPartyLikeItIs1999() function in the Quick Start documentation. +The 'expected' and 'actual' values were swapped. (Credits to Richard Jensen) + +It was pointed out that the simple 'failed' message for a failed assert was not +only insufficient, it was nonstandard (when compared to JUnit) and didn't +provide the user with an expected vs actual result. The code was revised +somewhat to bring closer into alignment with JUnit (v4.3.1 specifically) so +that it feels more "normal". (Credits to Richard Jensen) + +As part of the JUnit realignment, it was noticed that fail*() functions in +JUnit don't actually do any comparisons themselves. They only generate a +failure message. Updated the code to match. + +Added self-testing unit tests. Kinda horkey, but they did find bugs during the +JUnit realignment. + +Fixed the code for returning from asserts as the return was being called before +the unsetting of variables occurred. (Credits to Mathias Goldau) + +The assert(True|False)() functions now accept an integer value for a +conditional test. A value of '0' is considered 'true', while any non-zero value +is considered 'false'. + +All public functions now fill use default values to work properly with the '-x' +shell debugging flag. + +Fixed the method of percent calculation for the report to get achieve better +accuracy. + + +CHANGES WITH 2.0.2 + +Fixed problem with fail(). The failure message was not properly printed. + +Reworked the Makefile so that the DocBook XML and XSLT files are properly +downloaded before parsing can continue. + + +CHANGES WITH 2.0.1 + +Fixed some really stupid mistakes with the fail* functions. They were doing the +exact opposite of what they were supposed to be doing. + + +CHANGES WITH 2.0.0 + +Made the first stand-alone release! + + +$Revision$ +vim:spell diff --git a/contrib/shunit2-2.0.3/doc/LGPL-2.1 b/contrib/shunit2-2.0.3/doc/LGPL-2.1 new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/LGPL-2.1 @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/contrib/shunit2-2.0.3/doc/README.txt b/contrib/shunit2-2.0.3/doc/README.txt new file mode 100644 index 0000000..538f4f4 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/README.txt @@ -0,0 +1,153 @@ +#------------------------------------------------------------------------------ +# SourceForge +# + +This project is stored on SourceForge as http://sf.net/projects/shunit2. The +source code can be accessed using the following information. + +* Subversion +$ svn co https://shunit2.svn.sourceforge.net/svnroot/shunit2/trunk/source shunit2 + +Subversion may also be browsed via a web browser at +http://svn.sourceforge.net/shunit2 + +#------------------------------------------------------------------------------ +# Making a release +# + +For these steps, it is assumed we are working with release 2.0.0. + +Steps: +* write release notes +* update version +* finish changelog +* check all the code in +* tag the release +* export the release +* create tarball +* md5sum the tarball and sign with gpg +* update website +* post to SourceForge and Freshmeat + +WRITE RELEASE NOTES + +This should be pretty self explainatory. Use one of the release notes from a +previous release as an example. + +To get the versions of the various shells, do the following: +Cygwin + bash: $ bash --version + ksh: actually pdksh + pdksh: look in the downloaded Cygwin directory +Linux + bash: $ bash --version + dash: look at installed version + ksh: $ ksh --version + pdksh: $ strings /bin/pdksh |grep 'PD KSH' + zsh: $ zsh --version +Solaris 10 + sh: not possible + bash: $ bash --version + ksh: $ strings /usr/bin/ksh |grep 'Version' + +UPDATE VERSION + +Edit the shunit2 source code, and change the version number in the comment, as +well as in the __SHUNIT_VERSION variable. Next, edit the +src/docbook/shunit2.xml file, edit the version in the element, and make +sure there is a revision section for this release. + +FINISH DOCUMENTATION + +Make sure that any remaning changes get put into the CHANGES-X.X.txt file. + +Finish writing the RELEASE_NOTES-X.X.X.txt. Once it is finished, run it through +the 'fmt' command to make it pretty. + +$ fmt -w 80 RELEASE_NOTES-2.0.0.txt >RELEASE_NOTES-2.0.0.txt.new +$ mv RELEASE_NOTES-2.0.0.txt.new RELEASE_NOTES-2.0.0.txt + +We want to have an up-to-date version of the documentation in the release, so +we'd better build it. + +$ pwd +.../shunit2/source/2.0 +$ make docs +... +$ cp -p build/shunit2.html doc +$ svn ci -m "" doc/shunit2.html + +CHECK IN ALL THE CODE + +This step is pretty self-explainatory + +TAG THE RELEASE + +$ pwd +.../shunit2/source +$ ls +2.0 2.1 +$ svn cp -m "Release 2.0.0" \ +2.0 https://shunit2.svn.sourceforge.net/svnroot/shunit2/tags/source/2.0.0 + +EXPORT THE RELEASE + +$ pwd +.../shunit2/builds +$ svn export \ +https://shunit2.svn.sourceforge.net/svnroot/shunit2/tags/source/2.0.0 \ +shunit2-2.0.0 + +CREATE TARBALL + +$ tar cfz ../releases/shunit2-2.0.0.tgz shunit2-2.0.0 + +MD5SUM THE TARBALL AND SIGN WITH GPG + +$ cd ../releases +$ md5sum shunit2-2.0.0.tgz >shunit2-2.0.0.tgz.md5 +$ gpg --default-key kate.ward@forestent.com --detach-sign shunit2-2.0.0.tgz + +UPDATE WEBSITE + +Again, pretty self-explainatory. Make sure to copy the MD5 and GPG signature +files. Once that is done, make sure to tag the website so we can go back in +time if needed. + +$ pwd +.../shunit2 +$ ls +source website +$ svn cp -m "Release 2.0.0" \ +website https://shunit2.svn.sourceforge.net/svnroot/shunit2/tags/website/20060916 + +Now, update the website. It too is held in Subversion, so ssh into SourceForge +and use 'svn up' to grab the latest version. + +POST TO SOURCEFORGE AND FRESHMEAT + +http://sourceforge.net/projects/shunit2/ +http://freshmeat.net/ + +#------------------------------------------------------------------------------ +# Related documentation +# + +Docbook XML + docbook-xml-4.4.zip + http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip + http://www.oasis-open.org/docbook/xml/4.4/docbook-xml-4.4.zip + docbook-xml-4.5.zip + http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip + +Docbook XSL + docbook-xsl-1.71.0.tar.bz2 + http://prdownloads.sourceforge.net/docbook/docbook-xsl-1.71.0.tar.bz2?download + docbook-xsl-1.71.1.tar.bz2 + http://downloads.sourceforge.net/docbook/docbook-xsl-1.71.1.tar.bz2?use_mirror=puzzle + +JUnit + http://www.junit.org + + +$Revision$ diff --git a/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt new file mode 100644 index 0000000..947eea9 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt @@ -0,0 +1,71 @@ +RELEASE NOTES FOR 2.0.0 + +This is the initial release of shunit2. It was originally included in log4sh +1.3.5 [http://log4sh.sourceforge.net/] as a unit testing framework for that +product. It has since grown table enough to warrant being released into the +wild on its own. + + +TESTED PLATFORMS + +This list of platforms comes from the latest version of log4sh as shunit2 is +used in the testing of log4sh on each of these platforms. + +Cygwin ++ bash 3.2.9(10) ++ pdksh 5.2.14 + +Linux ++ bash 3.1.17(1) ++ dash 0.5.3 ++ ksh 1993-12-28 ++ pdksh 5.2.14 ++ zsh 4.3.2 (does not work) + +Mac OS X 1.4.8 (Darwin 8.8) ++ bash 2.05b.0(1) ++ ksh 1993-12-28 + +Solaris 8 U3 (x86) ++ /bin/sh ++ bash 2.03.0(1) ++ ksh M-11/16/88i + +Solaris 10 U2 (sparc) ++ /bin/sh ++ bash 3.00.16(1) ++ ksh M-11/16/88i + +Solaris 10 U2 (x86) ++ /bin/sh ++ bash 3.00.16(1) ++ ksh M-11/16/88i + + +NEW FEATURES + +None. + + +CHANGES AND ENHANCEMENTS + +None. + + +BUG FIXES + +None. + + +DEPRECATED FEATURES + +None. + + +KNOWN BUGS AND ISSUES + +None. + + +$Revision$ +vim:spell diff --git a/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt new file mode 100644 index 0000000..110a37a --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt @@ -0,0 +1,73 @@ +RELEASE NOTES FOR 2.0.1 + +This release is mostly a brown-bag release. Not so nice for the second release +ever of the product, but that's what I get for trying to get something out +there that I hadn't fully looked through one last time. + + +TESTED PLATFORMS + +This list of platforms comes from the latest version of log4sh as shunit2 is +used in the testing of log4sh on each of these platforms. + +Cygwin ++ bash 3.2.9(10) ++ pdksh 5.2.14 + +Linux ++ bash 3.1.17(1) ++ dash 0.5.3 ++ ksh 1993-12-28 ++ pdksh 5.2.14 ++ zsh 4.3.2 (does not work) + +Mac OS X 1.4.8 (Darwin 8.8) ++ bash 2.05b.0(1) ++ ksh 1993-12-28 + +Solaris 8 U3 (x86) ++ /bin/sh ++ bash 2.03.0(1) ++ ksh M-11/16/88i + +Solaris 10 U2 (sparc) ++ /bin/sh ++ bash 3.00.16(1) ++ ksh M-11/16/88i + +Solaris 10 U2 (x86) ++ /bin/sh ++ bash 3.00.16(1) ++ ksh M-11/16/88i + + +NEW FEATURES + +None. + + +CHANGES AND ENHANCEMENTS + +The documentation regarding the assertTrue() and assertFalse() functions was +updated to reflect their proper usage. They are shell test condition evaluators +(e.g. "[1 -eq 2]") rather than simple 0/1 comparators. + + +BUG FIXES + +The fail*() functions were doing the exact opposite of what they were supposed +to be doing. They have been fixed. + + +DEPRECATED FEATURES + +None. + + +KNOWN BUGS AND ISSUES + +None. + + +$Revision$ +vim:spell diff --git a/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt new file mode 100644 index 0000000..e7bcad6 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt @@ -0,0 +1,71 @@ +RELEASE NOTES FOR 2.0.2 + +This is solely a bug-fix release. + + +TESTED PLATFORMS + +This list of platforms comes from the latest version of log4sh as shUnit2 is +used in the testing of log4sh on each of these platforms. + +Cygwin ++ bash 3.2.9(10) ++ pdksh 5.2.14 + +Linux ++ bash 3.1.17(1) ++ dash 0.5.3 ++ ksh 1993-12-28 ++ pdksh 5.2.14 ++ zsh 4.3.2 (does not work) + +Mac OS X 1.4.8 (Darwin 8.8) ++ bash 2.05b.0(1) ++ ksh 1993-12-28 + +Solaris 8 U3 (x86) ++ /bin/sh ++ bash 2.03.0(1) ++ ksh M-11/16/88i + +Solaris 10 U2 (sparc) ++ /bin/sh ++ bash 3.00.16(1) ++ ksh M-11/16/88i + +Solaris 10 U2 (x86) ++ /bin/sh ++ bash 3.00.16(1) ++ ksh M-11/16/88i + + +NEW FEATURES + +None. + + +CHANGES AND ENHANCEMENTS + +None. + + +BUG FIXES + +The fail() function did not output the optional failure message. + +Fixed the Makefile so that the DocBook XML and XSLT files would be downloaded +before parsing can continue. + + +DEPRECATED FEATURES + +None. + + +KNOWN BUGS AND ISSUES + +None. + + +$Revision$ +vim:spell diff --git a/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt new file mode 100644 index 0000000..7e12684 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt @@ -0,0 +1,60 @@ +RELEASE NOTES FOR 2.0.3 + +This release incorporates a realignment with the JUnit 4 code. Asserts now +provide better failure messages, and the failure functions no longer perform +tests. + +See the CHANGES-2.0.txt file for a full list of changes. + + +TESTED PLATFORMS + +This list of platforms comes from the latest version of log4sh as shUnit2 is +used in the testing of log4sh on each of these platforms. + +Cygwin -- untested + +Linux +- bash 3.2.13(1) +- dash 0.5.3 +- ksh 1993-12-28 +- pdksh 5.2.14 + +Mac OS X -- untested +Solaris 8 -- untested +Solaris 10 -- untested + + +NEW FEATURES + +None. + + +CHANGES AND ENHANCEMENTS + +The internal test in assertFalse() was changed so that any non-zero value is +considered false, rather than any only values equal to 1. + +The assertTrue() and assertFalse() functions now accept an integer value for a +conditional test. A value of '0' is considered 'true', while any non-zero value +is considered 'false'. + +Self-testing unit tests were added. + + +BUG FIXES + +All asserts now properly unset their variables. + + +DEPRECATED FEATURES + +None. + + +KNOWN BUGS AND ISSUES + +Functions do not properly test for an invalid number of arguments. + + +vim:spell diff --git a/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt new file mode 100644 index 0000000..64fb417 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt @@ -0,0 +1,51 @@ +RELEASE NOTES FOR 2.0.4 + +This is a minor bugfix release. + +See the CHANGES-2.0.txt file for a full list of changes. + + +TESTED PLATFORMS + +This list of platforms comes from the latest version of log4sh as shUnit2 is +used in the testing of log4sh on each of these platforms. + +Cygwin -- untested + +Linux +- bash 3.2.13(1) +- dash 0.5.3 +- ksh 1993-12-28 +- pdksh 5.2.14 + +Mac OS X -- untested +Solaris 8 -- untested +Solaris 10 -- untested + + +NEW FEATURES + +None. + + +CHANGES AND ENHANCEMENTS + +None. + + +BUG FIXES + +The library no longer fails when the 'od' command is not present. + + +DEPRECATED FEATURES + +None. + + +KNOWN BUGS AND ISSUES + +Functions do not properly test for an invalid number of arguments. + + +vim:spell diff --git a/contrib/shunit2-2.0.3/doc/TODO.txt b/contrib/shunit2-2.0.3/doc/TODO.txt new file mode 100644 index 0000000..7fd6314 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/TODO.txt @@ -0,0 +1,5 @@ +Make it possible to execute a single test by passing the name of the test on +the command line + + +$Revision$ diff --git a/contrib/shunit2-2.0.3/doc/contributors.txt b/contrib/shunit2-2.0.3/doc/contributors.txt new file mode 100644 index 0000000..69da654 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/contributors.txt @@ -0,0 +1,10 @@ +The original author of shunit2 is Kate Ward. The following people have +contributed in some way or another to shunit2. + +Bryan Larsen +Kevin Van Horn +Mathias Goldau +Richard Jensen +Rob Holland + +$Revision$ diff --git a/contrib/shunit2-2.0.3/doc/design_doc.txt b/contrib/shunit2-2.0.3/doc/design_doc.txt new file mode 100644 index 0000000..2849e55 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/design_doc.txt @@ -0,0 +1,54 @@ +Design Doc for shUnit2 +====================== + +shUnit is based upon JUnit. The initial ideas for the script came from the book +"Pragmatic Unit Testing - In Java with JUnit" by Andrew Hunt and David Thomas. + +The script was written to perform unit testing for log4sh. log4sh had grown +enough that it was becoming difficult to easily test and and verify that the +tests passed for the many different operating systems on which it was being +used. + +The functions in shUnit are meant to match those in JUnit as much as possible +where shell allows. In the initial version, there will be no concept of +exceptions (as normal POSIX shell has no concept of them) but attempts to trap +problems will be done. + +Programatic Standards +--------------------- + +* SHUNIT_TRUE - public global constant +* __SHUNIT_SHELL_FLAGS - private global constant +* __shunit_oldShellFlags - private global variable + +* assertEquals - public unit test function +* shunit_publicFunc - public shUnit function; can be called from parent unit + test script +* _shunit_privateFunc - private shUnit function; should not be called from + parent script. meant for internal use by shUnit + +* _su_myVar - variable inside a public function. prefixing with '_su_' to + reduce the chances that a variable outside of shUnit will be overridden. +* _su__myVar - variable inside a private function. prefixing with '_su__' to + reduce the chances that a variable in a shUnit public function, or a variable + outside of shUnit will be overridden. + +List of functions +----------------- + +assertTrue([message,] boolean) +assertFalse([message,] boolean) +fail([message]) +assertEquals([message,] expected, actual) +#isEquals(expected, actual) +#assertArrayEquals([message,] expecteds, actuals) +#isArray(expected) +assertNotNull([message,] object) +assertNull([message,], object) +assertSame([message,], expected, actual) +assertNotSame([message,], unexpected, actual) +failSame(message) +failNotSame([message,] expected, actual) + +.. $Revision$ +.. vim:syntax=rst diff --git a/contrib/shunit2-2.0.3/doc/shunit2.html b/contrib/shunit2-2.0.3/doc/shunit2.html new file mode 100644 index 0000000..b3c1e83 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/shunit2.html @@ -0,0 +1,218 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>shUnit2

shUnit2 version 2.0.3

Kate Ward


+            
+          

2007-07-12

Revision History
Revision 2.0.32007-07-12Kate Ward <kate.ward@forestent.com>
Revision 2.0.22007-04-22Kate Ward <kate.ward@forestent.com>
Revision 2.0.12007-02-21Kate Ward <kate.ward@forestent.com>
Revision 2.0.02007-02-20Kate Ward <kate.ward@forestent.com>

Abstract

shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc.


List of Tables

3.1. asserts
3.2. failures
3.3. suites

Chapter 1. Introduction

shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc.

shUnit2 was originally developed to provide a consistent testing solution for log4sh, a shell based logging framework similar to log4j. During the development of that product, the problem of having things work just fine under one shell (/bin/bash on Linux to be specific), and then not working under another shell (/bin/sh on Solaris), kept coming up. Although there were several simple tests ran, they were not adaquate and did not catch very many corner cases. The decision was finally made to write a proper unit test framework after after multiple brown-bag releases were made.

Tested Operating Systems

Tested Shells

  • Bourne Shell (sh)

  • BASH - GNU Bourne Again SHell (bash)

  • DASH (dash)

  • Korn Shell (ksh)

  • pdksh - Public Domain Korn Shell (pdksh)

See the appropriate Release Notes (doc/RELEASE_NOTES-X.X.X.txt) for this release for the actual versions tested.

1. Credits / Contributors

A list of contributors to shUnit2 can be found in the source archive as doc/contributors.txt. I want to personally thank all those who have contributed to make this a better tool.

2. Feedback

Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address: .

Chapter 2. Quickstart

This chapter will give a very quick start to running unit tests with shUnit2. More information is located in other chapters.

Here is a quick sample script to show how easy it is to write a unit test in shell. It expects that you have a copy of shunit2 in the same directory as the script.

+
+#! /bin/sh
+
+testEquality()
+{
+  assertEquals 1 1
+}
+
+# load shunit2
+. ./shunit2
+
+  

Running the unit test should give results similar to the following.

+
+#
+# Performing tests
+#
+testEquality
+
+#
+# Test report
+#
+tests passed: 1
+tests failed: 0
+tests total:  1
+success rate: 100%
+
+  

Wohoo! You've just run your first successful unit test. So, what just happened? Quite a bit really, and it all happened simply by sourcing the shunit2 script. The basic functionality for the script above goes like this.

When shUnit2 is sourced, it first looks to see if a suite() function has been declared. If it exists, it is called as it is expected to contain a list of tests to be executed. If it doesn't exist (and it doesn't in the above example), shUnit2 will look on its own for any functions that start with the string test, and adds those to an internal list of tests to execute. Once a list of test functions to be run has been determined, shunit2 will go to work.

Before any tests are executed, shUnit2 again looks for a function, this time one named oneTimeSetUp(). If it exists, it will be run. This function is normally used to setup the environment for all tests to be run. Things like creating directories for output or setting environment variables are good to place here. Just so you know, you can also declare a corresponding function named oneTimeTearDown() function that does the same thing, but once all the tests have been completed. It is good for removing temporary directories, etc.

shUnit2 is now ready to run tests. Before doing so though, it again looks for another function that might be declared, one named setUp(). If the function exists, it will be run before each test. It is good for resetting the environment so that each test starts with a clean slate. At this stage, the first test is finally run. The success of the test is recorded for a report that will be generated later. After the test is run, shUnit2 looks for a final function that might be declared, one named tearDown(). If it exists, it will be run after each test. It is a good place for cleaning up after each test, maybe doing things like removing files that were created, or removing directories. This set of steps, setUp() > test() > tearDown(), is repeated for all of the available tests.

Once all the work is done, shUnit2 will generate the nice report you saw above. A summary of all the successes and failures will be given so that you know how well your code is doing.

We should now try adding a test that fails. Change your unit test to look like this.

+
+#! /bin/sh
+
+testEquality()
+{
+  assertEquals 1 1
+}
+
+testPartyLikeItIs1999()
+{
+  year=`date '+%Y'`
+  assertEquals "It's not 1999 :-( This is ${year}." \
+      '1999' "${year}"
+}
+
+# load shunit2
+. ./shunit2
+
+  

So, what did you get? I guess it told you that this isn't 1999. Bummer, eh? Hopefully, you noticed a couple of things that were different about the second test. First, we added an optional message that the user will see if the assert fails. Second, we did comparisons of strings instead of integers as in the first test. It doesn't matter whether you are testing for equality of strings or integers. Both work equally well with shUnit2.

Hopefully, this is enough to get you started with unit testing. If you want a ton more examples, take a look at the tests provided with log4sh. Examples of much more advanced usage can be seen there. shUnit2 was after all written to help with the unit testing problems that log4sh had.

Chapter 3. Function Reference

1. asserts

Table 3.1. asserts

+ void + +
+ assertEquals + ([message],  
 expected,  
 actual); 
string  [message];
string  expected;
string  actual;
+

Asserts that expected and + actual are equal to one another. The message is + optional.

+
+ void + +
+ assertNull + ([message],  
 value); 
string  [message];
string  value;
+

Asserts that value is null, + or in shell terms a zero-length string. The message is optional.

+
+ void + +
+ assertNotNull + ([message],  
 value); 
string  [message];
string  value;
+

Asserts that value is notnull, or in shell terms not + a zero-length string. The message is optional.

+
+ void + +
+ assertSame + ([message],  
 expected,  
 actual); 
string  [message];
string  expected;
string  actual;
+

This function is functionally equivalent to + assertEquals.

+
+ void + +
+ assertNotSame + ([message],  
 unexpected,  
 actual); 
string  [message];
string  unexpected;
string  actual;
+

Asserts that unexpected and + actual are not + equal to one another. The message is optional.

+
+ void + +
+ assertTrue + ([message],  
 condition); 
string  [message];
string  condition;
+

Asserts that a given shell test condition is true. The message is + optional.

+

Testing whether something is true or false is easy enough by using + the assertEquals/assertNotSame functions. Shell supports much more + complicated tests though, and a means to support them was needed. As such, + this function tests that conditions are true or false through evaluation + rather than just looking for a true or false.

+
+ The following test will succeed:
assertTrue "[ 34 -gt 23 ]"
+ The following test will fail with a message:
assertTrue "test failed" "[ -r '/non/existent/file' ]"
+
+ void + +
+ assertFalse + ([message],  
 condition); 
string  [message];
string  condition;
+

Asserts that a given shell test condition is false. The message is + optional.

+

Testing whether something is true or false is easy enough by using + the assertEquals/assertNotSame functions. Shell supports much more + complicated tests though, and a means to support them was needed. As such, + this function tests that conditions are true or false through evaluation + rather than just looking for a true or false.

+
+ The following test will succeed:
assertFalse "[ 'apples' = 'oranges' ]"
+ The following test will fail with a message:
assertFalse "test failed" "[ 1 -eq 1 -a 2 -eq 2 ]"
+

2. failures

Table 3.2. failures

+ void + +
+ fail + ([message]); 
string  [message];
+

Fails the test immediately, with the optional message.

+
+ void + +
+ failNotEquals + ([message],  
 unexpected,  
 actual); 
string  [message];
string  unexpected;
string  actual;
+

Fails the test if unexpected and + actual are not + equal to one another. The message is optional.

+
+ void + +
+ failSame + ([message]); 
string  [message];
+

Indicate test failure because arguments were not the same. The + message is optional.

+
+ void + +
+ failNotSame + ([message],  
 expected,  
 actual); 
string  [message];
string  expected;
string  actual;
+

Fails the test if expected and + actual are equal to one another. The message is + optional.

+

3. suites

Table 3.3. suites

+ void + +
+ suite + (); 
 ;
+

This function can be optionally overridden by the user in their test + suite.

+

If this function exists, it will be called when + shunit2 is sourced. If it does not exist, shUnit2 will + search the parent script for all functions beginning with the word + test, and they will be added dynamically to the test + suite.

+
+ void + +
+ suite_addTest + (function); 
string  function;
+

This function adds a function name to the list of tests scheduled for + execution as part of this test suite. This function should only be called + from within the suite() function.

+
+ void + +
+ oneTimeSetUp + (); 
 ;
+

This function can be be optionally overridden by the user in their + test suite.

+

If this function exists, it will be called once before any tests are + run. It is useful to prepare a common environment for all tests.

+
+ void + +
+ oneTimeTearDown + (); 
 ;
+

This function can be be optionally overridden by the user in their + test suite.

+

If this function exists, it will be called once after all tests are + completed. It is useful to clean up the environment after all tests.

+
+ void + +
+ setUp + (); 
 ;
+

This function can be be optionally overridden by the user in their + test suite.

+

If this function exists, it will be called before each test is run. + It is useful to reset the environment before each test.

+
+ void + +
+ tearDown + (); 
 ;
+

This function can be be optionally overridden by the user in their + test suite.

+

If this function exists, it will be called after each test completes. + It is useful to clean up the environment after each test.

+

diff --git a/contrib/shunit2-2.0.3/doc/style.css b/contrib/shunit2-2.0.3/doc/style.css new file mode 100644 index 0000000..c1d2f43 --- /dev/null +++ b/contrib/shunit2-2.0.3/doc/style.css @@ -0,0 +1,33 @@ +/* $Id$ */ +/* + style.css +*/ + + +body { + +/* + Style the HMTL tag with a sans-serif font and 6% margin. + A sans-serif font makes documents easier to read when displayed on + a computer screen. Whitespace surrounding the document should + make it easier to read both on screen and on printed paper. The + value of 6% was chosen because it closely approximates a one-half + inch margin on a US letter (8.5" by 11") paper. Since the margin + is expressed as a percentage it should scale well in a web browser + window. +*/ + + font-family: sans-serif; + margin: 6%; +} + +/* +table { + font-size: 0.9em; +} +*/ + +.toc { + background: #f0f0f0; + padding: 5px; +} diff --git a/contrib/shunit2-2.0.3/lib/sh/shlib b/contrib/shunit2-2.0.3/lib/sh/shlib new file mode 100644 index 0000000..00aadcb --- /dev/null +++ b/contrib/shunit2-2.0.3/lib/sh/shlib @@ -0,0 +1,23 @@ +# $Id$ +# vim:syntax=sh +# +# library of shell functions +# + +shlib_relToAbsPath() +{ + _shlib_path=$1 + + # deal with paths that start with / + echo "${_shlib_path}" |grep '^/' >/dev/null 2>&1 + if [ $? -ne 0 ]; then + _shlib_pwd=`pwd` + _shlib_path="${_shlib_pwd}/${_shlib_path}" + unset _shlib_pwd + fi + + # clean up the path + echo "${_shlib_path}" |sed 's/[^/]*\/*\.\.\/*//g;s/\/\.\//\//' + + unset _shlib_path +} diff --git a/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl b/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl new file mode 100644 index 0000000..b7a7d43 --- /dev/null +++ b/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl @@ -0,0 +1,26 @@ + + + + + + + + + + + +start + + + + + + + + diff --git a/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl b/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl new file mode 100644 index 0000000..f8cf7b1 --- /dev/null +++ b/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl @@ -0,0 +1,22 @@ + + + + + + + +text/css + + + + + + + diff --git a/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl b/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl new file mode 100644 index 0000000..16994ad --- /dev/null +++ b/contrib/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/contrib/shunit2-2.0.3/share/resources/shelldoc.xslt b/contrib/shunit2-2.0.3/share/resources/shelldoc.xslt new file mode 100644 index 0000000..45d5f92 --- /dev/null +++ b/contrib/shunit2-2.0.3/share/resources/shelldoc.xslt @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + Function Reference + + + +
+ shelldoc-section- + <xsl:value-of select="@group"/> + + shelldoc-function- + <xsl:value-of select="@group"/> + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + +
diff --git a/contrib/shunit2-2.0.3/src/docbook/functions.xml b/contrib/shunit2-2.0.3/src/docbook/functions.xml new file mode 100644 index 0000000..c960e55 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/docbook/functions.xml @@ -0,0 +1,14 @@ + + + + + + + Functions + This XML file is a placeholder. It is meant to be overwritten with the dynamically generated XML document that is extracted from the source code. + diff --git a/contrib/shunit2-2.0.3/src/docbook/introduction.xml b/contrib/shunit2-2.0.3/src/docbook/introduction.xml new file mode 100644 index 0000000..d71b091 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/docbook/introduction.xml @@ -0,0 +1,50 @@ + + + + + + + + Introduction + shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc. + + shUnit2 was originally developed to provide a consistent testing solution for log4sh, a shell based logging framework similar to log4j. During the development of that product, the problem of having things work just fine under one shell (/bin/bash on Linux to be specific), and then not working under another shell (/bin/sh on Solaris), kept coming up. Although there were several simple tests ran, they were not adaquate and did not catch very many corner cases. The decision was finally made to write a proper unit test framework after after multiple brown-bag releases were made. + +
Tested Operating Systems + + Cygwin + FreeBSD (user supported) + Linux (Gentoo, Ubuntu) + Mac OS X + Solaris 8, 9, 10 + +
+ +
Tested Shells + + Bourne Shell (sh) + BASH - GNU Bourne Again SHell (bash) + DASH (dash) + Korn Shell (ksh) + pdksh - Public Domain Korn Shell (pdksh) + +
+ + See the appropriate Release Notes (doc/RELEASE_NOTES-X.X.X.txt) for this release for the actual versions tested. + + +
Credits / Contributors + A list of contributors to shUnit2 can be found in the source archive as doc/contributors.txt. I want to personally thank all those who have contributed to make this a better tool. +
+ + +
Feedback + Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address: &myEmail;. +
+ +
diff --git a/contrib/shunit2-2.0.3/src/docbook/quickstart.xml b/contrib/shunit2-2.0.3/src/docbook/quickstart.xml new file mode 100644 index 0000000..d009cb6 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/docbook/quickstart.xml @@ -0,0 +1,86 @@ + + + + + + Quickstart + + This chapter will give a very quick start to running unit tests with shUnit2. More information is located in other chapters. + + Here is a quick sample script to show how easy it is to write a unit test in shell. It expects that you have a copy of &shunit2; in the same directory as the script. + + + + + + Running the unit test should give results similar to the following. + + + + + + Wohoo! You've just run your first successful unit test. So, what just happened? Quite a bit really, and it all happened simply by sourcing the &shunit2; script. The basic functionality for the script above goes like this. + + When shUnit2 is sourced, it first looks to see if a suite() function has been declared. If it exists, it is called as it is expected to contain a list of tests to be executed. If it doesn't exist (and it doesn't in the above example), shUnit2 will look on its own for any functions that start with the string test, and adds those to an internal list of tests to execute. Once a list of test functions to be run has been determined, shunit2 will go to work. + + Before any tests are executed, shUnit2 again looks for a function, this time one named oneTimeSetUp(). If it exists, it will be run. This function is normally used to setup the environment for all tests to be run. Things like creating directories for output or setting environment variables are good to place here. Just so you know, you can also declare a corresponding function named oneTimeTearDown() function that does the same thing, but once all the tests have been completed. It is good for removing temporary directories, etc. + + shUnit2 is now ready to run tests. Before doing so though, it again looks for another function that might be declared, one named setUp(). If the function exists, it will be run before each test. It is good for resetting the environment so that each test starts with a clean slate. At this stage, the first test is finally run. The success of the test is recorded for a report that will be generated later. After the test is run, shUnit2 looks for a final function that might be declared, one named tearDown(). If it exists, it will be run after each test. It is a good place for cleaning up after each test, maybe doing things like removing files that were created, or removing directories. This set of steps, setUp() > test() > tearDown(), is repeated for all of the available tests. + + Once all the work is done, shUnit2 will generate the nice report you saw above. A summary of all the successes and failures will be given so that you know how well your code is doing. + + We should now try adding a test that fails. Change your unit test to look like this. + + + + + + So, what did you get? I guess it told you that this isn't 1999. Bummer, eh? Hopefully, you noticed a couple of things that were different about the second test. First, we added an optional message that the user will see if the assert fails. Second, we did comparisons of strings instead of integers as in the first test. It doesn't matter whether you are testing for equality of strings or integers. Both work equally well with shUnit2. + + Hopefully, this is enough to get you started with unit testing. If you want a ton more examples, take a look at the tests provided with log4sh. Examples of much more advanced usage can be seen there. shUnit2 was after all written to help with the unit testing problems that log4sh had. + diff --git a/contrib/shunit2-2.0.3/src/docbook/shunit2.xml b/contrib/shunit2-2.0.3/src/docbook/shunit2.xml new file mode 100644 index 0000000..25b3fed --- /dev/null +++ b/contrib/shunit2-2.0.3/src/docbook/shunit2.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + shunit2"> +]> + +shUnit2 + + shUnit2 version 2.0.3 + + + KateWard + +
+ &myEmail; +
+
+
+
+ + + &isoDate; + + + + + + + 2.0.3 + 2007-07-12 + Kate Ward <&myEmail;> + + + + 2.0.2 + 2007-04-22 + Kate Ward <&myEmail;> + + + + 2.0.1 + 2007-02-21 + Kate Ward <&myEmail;> + + + + 2.0.0 + 2007-02-20 + Kate Ward <&myEmail;> + + + + + + shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc. + +
+ + &introduction; + &quickstart; + &functions; +
diff --git a/contrib/shunit2-2.0.3/src/shell/shunit2 b/contrib/shunit2-2.0.3/src/shell/shunit2 new file mode 100644 index 0000000..b9d1130 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/shell/shunit2 @@ -0,0 +1,799 @@ +# $Id$ +# vim:syntax=sh:sts=2 +# vim:foldmethod=marker:foldmarker=/**,*/ +# +#/** +# +# +# +# shUnit 2.0.4 +# Shell Unit Test Framework +# +# http://code.google.com/p/shunit2/ +# +# written by Kate Ward <kate.ward@forestent.com> +# released under the LGPL +# +# this module implements a xUnit based unit test framework similar to JUnit +# +#*/ + +# shell flags for shunit: +# u - treat unset variables as an error when performing parameter expansion +__SHUNIT_SHELL_FLAGS='u' + +# save the current set of shell flags, and then set some for ourselves +__shunit_oldShellFlags="$-" +for _shunit_shellFlag in `echo "${__SHUNIT_SHELL_FLAGS}" |sed 's/\(.\)/\1 /g'` +do + set -${_shunit_shellFlag} +done +unset _shunit_shellFlag + +# constants + +__SHUNIT_VERSION='2.0.4pre' + +__SHUNIT_TRUE=0 +__SHUNIT_FALSE=1 +__SHUNIT_ERROR=2 + +__SHUNIT_ASSERT_MSG_PREFIX='ASSERT:' + +for _su_const in `set |grep "^__SHUNIT_" |cut -d= -f1`; do + readonly ${_su_const} +done +unset _su_const + +# variables +__shunit_suite='' + +__shunit_testsPassed=0 +__shunit_testsFailed=0 +__shunit_testsTotal=0 + +#----------------------------------------------------------------------------- +# assert functions +# + +#/** +# +# +# void +# +# +# +# +# assertEquals +# string [message] +# string expected +# string actual +# +# +# Asserts that expected and +# actual are equal to one another. The message is +# optional. +# +# +#*/ +assertEquals() +{ + _su_message='' + if [ $# -eq 3 ]; then + _su_message=$1 + shift + fi + _su_expected=${1:-} + _su_actual=${2:-} + + shunit_return=${__SHUNIT_TRUE} + if [ "${_su_expected}" = "${_su_actual}" ]; then + _shunit_testPassed + else + failNotEquals "${_su_message}" "${_su_expected}" "${_su_actual}" + shunit_return=${__SHUNIT_FALSE} + fi + + unset _su_message _su_expected _su_actual + return ${shunit_return} +} + +#/** +# +# +# void +# +# +# +# +# assertNull +# string [message] +# string value +# +# +# Asserts that value is null, +# or in shell terms a zero-length string. The message is optional. +# +# +#*/ +assertNull() +{ + if [ $# -eq 2 ]; then + assertTrue "$1" "[ -z '$2' ]" + else + assertTrue "[ -z '${1:-}' ]" + fi +} + +#/** +# +# +# void +# +# +# +# +# assertNotNull +# string [message] +# string value +# +# +# Asserts that value is not null, or in shell terms not +# a zero-length string. The message is optional. +# +# +#*/ +assertNotNull() +{ + if [ $# -eq 2 ]; then + assertTrue "$1" "[ -n '$2' ]" + else + assertTrue "[ -n '${1:-}' ]" + fi +} + +#/** +# +# +# void +# +# +# +# +# assertSame +# string [message] +# string expected +# string actual +# +# +# This function is functionally equivalent to +# assertEquals. +# +# +#*/ +assertSame() +{ + assertEquals "${@:-}" +} + +#/** +# +# +# void +# +# +# +# +# assertNotSame +# string [message] +# string unexpected +# string actual +# +# +# Asserts that unexpected and +# actual are not +# equal to one another. The message is optional. +# +# +#*/ +assertNotSame() +{ + _su_message='' + if [ $# -eq 3 ]; then + _su_message=$1 + shift + fi + _su_unexpected=${1:-} + _su_actual=${2:-} + + shunit_return=${__SHUNIT_TRUE} + if [ "${_su_unexpected}" != "${_su_actual}" ]; then + _shunit_testPassed + else + failSame "${_su_message}" + shunit_return=${__SHUNIT_FALSE} + fi + + unset _su_message _su_unexpected _su_actual + return ${shunit_return} +} + +#/** +# +# +# void +# +# +# +# +# assertTrue +# string [message] +# string condition +# +# +# Asserts that a given shell test condition is true. The message is +# optional. +# Testing whether something is true or false is easy enough by using +# the assertEquals/assertNotSame functions. Shell supports much more +# complicated tests though, and a means to support them was needed. As such, +# this function tests that conditions are true or false through evaluation +# rather than just looking for a true or false. +# +# The following test will succeed: assertTrue "[ 34 -gt 23 ]" +# The following test will fail with a message: assertTrue "test failed" "[ -r '/non/existent/file' ]" +# +# +# +#*/ +assertTrue() +{ + _su_message='' + if [ $# -eq 2 ]; then + _su_message=$1 + shift + fi + _su_condition=${1:-} + + shunit_return=${__SHUNIT_TRUE} + + # see if condition is an integer, i.e. a return value + _su_match=`expr "${_su_condition}" : '\([0-9]*\)'` + if [ -z "${_su_condition}" ]; then + # null condition + shunit_return=${__SHUNIT_FALSE} + elif [ "${_su_condition}" = "${_su_match}" ]; then + # possible return value. treating 0 as true, and non-zero as false. + [ ${_su_condition} -ne 0 ] && shunit_return=${__SHUNIT_FALSE} + else + # (hopefully) a condition + ( eval ${_su_condition} ) >/dev/null 2>&1 + [ $? -ne 0 ] && shunit_return=${__SHUNIT_FALSE} + fi + + # record the test + if [ ${shunit_return} -eq ${__SHUNIT_TRUE} ]; then + _shunit_testPassed + else + _shunit_testFailed "${_su_message}" + fi + + unset _su_message _su_condition _su_match + return ${shunit_return} +} + +#/** +# +# +# void +# +# +# +# +# assertFalse +# string [message] +# string condition +# +# +# Asserts that a given shell test condition is false. The message is +# optional. +# Testing whether something is true or false is easy enough by using +# the assertEquals/assertNotSame functions. Shell supports much more +# complicated tests though, and a means to support them was needed. As such, +# this function tests that conditions are true or false through evaluation +# rather than just looking for a true or false. +# +# The following test will succeed: assertFalse "[ 'apples' = 'oranges' ]" +# The following test will fail with a message: assertFalse "test failed" "[ 1 -eq 1 -a 2 -eq 2 ]" +# +# +# +#*/ +assertFalse() +{ + _su_message='' + if [ $# -eq 2 ]; then + _su_message=$1 + shift + fi + _su_condition=${1:-} + + shunit_return=${__SHUNIT_TRUE} + + # see if condition is an integer, i.e. a return value + _su_match=`expr "${_su_condition}" : '\([0-9]*\)'` + if [ -z "${_su_condition}" ]; then + # null condition + shunit_return=${__SHUNIT_FALSE} + elif [ "${_su_condition}" = "${_su_match}" ]; then + # possible return value. treating 0 as true, and non-zero as false. + [ ${_su_condition} -eq 0 ] && shunit_return=${__SHUNIT_FALSE} + else + # (hopefully) a condition + ( eval ${_su_condition} ) >/dev/null 2>&1 + [ $? -eq 0 ] && shunit_return=${__SHUNIT_FALSE} + fi + + # record the test + if [ ${shunit_return} -eq ${__SHUNIT_TRUE} ]; then + _shunit_testPassed + else + _shunit_testFailed "${_su_message}" + fi + + unset _su_message _su_condition _su_match + return ${shunit_return} +} + +#----------------------------------------------------------------------------- +# failure functions +# + +#/** +# +# +# void +# +# +# +# +# fail +# string [message] +# +# +# Fails the test immediately, with the optional message. +# +# +#*/ +fail() +{ + _su_message=${1:-} + + _shunit_testFailed "${_su_message}" + + unset _su_message +} + +#/** +# +# +# void +# +# +# +# +# failNotEquals +# string [message] +# string unexpected +# string actual +# +# +# Fails the test if unexpected and +# actual are not +# equal to one another. The message is optional. +# +# +#*/ +failNotEquals() +{ + _su_message='' + if [ $# -eq 3 ]; then + _su_message=$1 + shift + fi + _su_unexpected=${1:-} + _su_actual=${2:-} + + _shunit_testFailed "${_su_message:+${_su_message} }expected:<${_su_unexpected}> but was:<${_su_actual}>" + + unset _su_message _su_unexpected _su_actual +} + +#/** +# +# +# void +# +# +# +# +# failSame +# string [message] +# +# +# Indicate test failure because arguments were not the same. The +# message is optional. +# +# +#*/ +failSame() +{ + _su_message=${1:-} + + _shunit_testFailed "${_su_message:+${_su_message} }expected not same" + + unset _su_message +} + +#/** +# +# +# void +# +# +# +# +# failNotSame +# string [message] +# string expected +# string actual +# +# +# Fails the test if expected and +# actual are equal to one another. The message is +# optional. +# +# +#*/ +failNotSame() +{ + failNotEquals "${@:-}" +} + +#----------------------------------------------------------------------------- +# suite functions +# + +#/** +# +# +# void +# +# +# +# +# suite +# +# +# +# This function can be optionally overridden by the user in their test +# suite. +# If this function exists, it will be called when +# shunit2 is sourced. If it does not exist, shUnit2 will +# search the parent script for all functions beginning with the word +# test, and they will be added dynamically to the test +# suite. +# +# +#*/ +# Note: see _shunit_mktempFunc() for actual implementation +# suite() { :; } + +#/** +# +# +# void +# +# +# +# +# suite_addTest +# string function +# +# +# This function adds a function name to the list of tests scheduled for +# execution as part of this test suite. This function should only be called +# from within the suite() function. +# +# +#*/ +suite_addTest() +{ + _su_func=${1:-} + + __shunit_suite="${__shunit_suite:+${__shunit_suite} }${_su_func}" + + unset _su_func +} + +#/** +# +# +# void +# +# +# +# +# oneTimeSetUp +# +# +# +# This function can be be optionally overridden by the user in their +# test suite. +# If this function exists, it will be called once before any tests are +# run. It is useful to prepare a common environment for all tests. +# +# +#*/ +# Note: see _shunit_mktempFunc() for actual implementation +# oneTimeSetUp() { :; } + +#/** +# +# +# void +# +# +# +# +# oneTimeTearDown +# +# +# +# This function can be be optionally overridden by the user in their +# test suite. +# If this function exists, it will be called once after all tests are +# completed. It is useful to clean up the environment after all tests. +# +# +#*/ +# Note: see _shunit_mktempFunc() for actual implementation +# oneTimeTearDown() { :; } + +#/** +# +# +# void +# +# +# +# +# setUp +# +# +# +# This function can be be optionally overridden by the user in their +# test suite. +# If this function exists, it will be called before each test is run. +# It is useful to reset the environment before each test. +# +# +#*/ +# Note: see _shunit_mktempFunc() for actual implementation +# setUp() { :; } + +#/** +# +# +# void +# +# +# +# +# tearDown +# +# +# +# This function can be be optionally overridden by the user in their +# test suite. +# If this function exists, it will be called after each test completes. +# It is useful to clean up the environment after each test. +# +# +#*/ +# Note: see _shunit_mktempFunc() for actual implementation +# tearDown() { :; } + +#------------------------------------------------------------------------------ +# internal shUnit2 functions +# + +_shunit_cleanup() +{ + name=$1 + + case ${name} in + EXIT) signal=0 ;; + INT) signal=2 ;; + TERM) signal=15 ;; + esac + + # do our work + rm -fr "${__shunit_tmpDir}" + + # exit for all non-EXIT signals + if [ ${name} != 'EXIT' ]; then + echo "trapped and now handling the ${name} signal" >&2 + _shunit_generateReport + # disable EXIT trap + trap 0 + # add 128 to signal and exit + exit `expr ${signal} + 128` + fi +} + +_shunit_execSuite() +{ + echo '#' + echo '# Performing tests' + echo '#' + for _su_func in ${__shunit_suite}; do + # execute the per-test setup function + setUp + + # execute the test + echo "${_su_func}" + eval ${_su_func} + + # execute the per-test tear-down function + tearDown + done + + unset _su_func +} + +_shunit_functionExists() +{ + _su__func=$1 + type ${_su__func} 2>/dev/null |grep "is a function$" >/dev/null + _su__return=$? + unset _su__func + return ${_su__return} +} + +_shunit_generateReport() +{ + _su__awkPercent='{printf("%0.0f%%", $1*100/$2)}' + if [ ${__shunit_testsTotal} -gt 0 ]; then + _su__success=`echo ${__shunit_testsPassed} ${__shunit_testsTotal} |\ + awk "${_su__awkPercent}"` + else + _su__success=0 + fi + + cat </dev/null ) && return + + # the standard mktemp didn't work. doing our own. + if [ -r '/dev/urandom' -a -x '/usr/bin/od' ]; then + _su__random=`/usr/bin/od -vAn -N4 -tx4 &2 + return ${__SHUNIT_ERROR} + } + + echo ${_su__tmpDir} + unset _su__date _su__random _su__tmpDir +} + +# this function is here to work around issues in Cygwin +_shunit_mktempFunc() +{ + for _su__func in oneTimeSetUp oneTimeTearDown setUp tearDown suite; do + _su__file="${__shunit_tmpDir}/${_su__func}" + cat <"${_su__file}" +#! /bin/sh +exit 0 +EOF + chmod +x "${_su__file}" + done + + unset _su__file +} + +_shunit_testPassed() +{ + __shunit_testsPassed=`expr ${__shunit_testsPassed} + 1` + __shunit_testsTotal=`expr ${__shunit_testsTotal} + 1` +} + +_shunit_testFailed() +{ + _su__msg=$1 + + __shunit_testsFailed=`expr ${__shunit_testsFailed} + 1` + __shunit_testsTotal=`expr ${__shunit_testsTotal} + 1` + echo "${__SHUNIT_ASSERT_MSG_PREFIX}${_su__msg}" >&2 + + unset _su__msg +} + +#------------------------------------------------------------------------------ +# main +# + +# create a temporary storage location +__shunit_tmpDir=`_shunit_mktempDir` || exit ${__SHUNIT_ERROR} + +# setup traps to clean up after ourselves +trap '_shunit_cleanup EXIT' 0 +trap '_shunit_cleanup INT' 2 +trap '_shunit_cleanup TERM' 15 + +# create phantom functions to work around issues with Cygwin +_shunit_mktempFunc +PATH="${__shunit_tmpDir}:${PATH}" + +# execute the oneTimeSetUp function (if it exists) +#_shunit_functionExists oneTimeSetUp && oneTimeSetUp +oneTimeSetUp + +# deprecated: execute the suite function defined in the parent test script +suite + +# if no suite function was defined, dynamically build a list of functions +if [ -z "${__shunit_suite}" ]; then + funcs=`grep "^[ \t]*test[A-Za-z0-9_]* *()" $0 |sed 's/[^A-Za-z0-9_]//g'` + for func in ${funcs}; do + suite_addTest ${func} + done +fi + +# execute the tests +_shunit_execSuite + +# execute the oneTimeTearDown function (if it exists) +oneTimeTearDown + +# generate report +_shunit_generateReport + +# restore the previous set of shell flags +for _shunit_shellFlag in ${__SHUNIT_SHELL_FLAGS}; do + echo ${__shunit_oldShellFlags} |grep ${_shunit_shellFlag} >/dev/null \ + || set +${_shunit_shellFlag} +done +unset _shunit_shellFlag + +#/** +# +#*/ diff --git a/contrib/shunit2-2.0.3/src/test/run-test-suite b/contrib/shunit2-2.0.3/src/test/run-test-suite new file mode 100755 index 0000000..7791fa1 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/test/run-test-suite @@ -0,0 +1,116 @@ +#! /bin/sh +# $Id: run-test-suite 432 2007-01-05 14:58:37Z sfsetse $ + +MY_NAME=`basename $0` +MY_PATH=`dirname $0` + +SHELLS='/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh' +for f in test[A-Z]*; do + [ -x "${f}" ] && TESTS="${TESTS:+${TESTS} }${f}" +done + +# load common unit test functions +. "${MY_PATH}/test-functions.inc" + +usage() +{ + echo "usage: ${MY_NAME} [-e key=val ...] [-s shell(s)] [-t test(s)]" +} + +# process command line flags +while getopts 'e:hs:t:' opt; do + case ${opt} in + e) + key=`expr "${OPTARG}" : '\([^=]*\)='` + val=`expr "${OPTARG}" : '[^=]*=\(.*\)'` + if [ -z "${key}" -o -z "${val}" ]; then + usage + exit 1 + fi + eval "${key}='${val}'" + export ${key} + env="${env:+${env} }${key}" + ;; + h) usage; exit 0 ;; + s) shells=${OPTARG} ;; + t) tests=${OPTARG} ;; + *) usage; exit 1 ;; + esac +done +shift `expr ${OPTIND} - 1` + +# fill shells and/or tests +shells=${shells:-${SHELLS}} +tests=${tests:-${TESTS}} + +# error checking +if [ -z "${tests}" ]; then + tf_error 'no tests found to run; exiting' + exit 1 +fi + +cat <&1` + exitVal=$? + if [ ${exitVal} -eq 2 ]; then + echo + echo "${version}" + fi + ;; + pdksh) ;; + zsh) ;; + esac + + # execute the tests + for suite in ${tests}; do + suiteName=`expr "${suite}" : 'test\(.*\)'` + echo + echo "--- Executing the '${suiteName}' test suite ---" >&2 + ( exec ${shell} ./${suite}; ) + done +done diff --git a/contrib/shunit2-2.0.3/src/test/test-functions.inc b/contrib/shunit2-2.0.3/src/test/test-functions.inc new file mode 100644 index 0000000..fe7b3e9 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/test/test-functions.inc @@ -0,0 +1,84 @@ +# $Id: test-functions.inc 416 2007-01-04 00:50:14Z sfsetse $ +# vim:syntax=sh:sts=2 + +# +# constants +# + +# configure debugging. set the DEBUG environment variable to any +# non-empty value to enable debug output, or TRACE to enable trace +# output. +TRACE=${TRACE:+'tf_trace '} +[ -n "${TRACE}" ] && DEBUG=1 +[ -z "${TRACE}" ] && TRACE=':' + +DEBUG=${DEBUG:+'tf_debug '} +[ -z "${DEBUG}" ] && DEBUG=':' + +# +# variables +# + +tf_RANDOM=0 + +# +# functions +# + +# message functions +tf_trace() { echo "${MY_NAME}:TRACE $@" >&2; } +tf_debug() { echo "${MY_NAME}:DEBUG $@" >&2; } +tf_info() { echo "${MY_NAME}:INFO $@" >&2; } +tf_warn() { echo "${MY_NAME}:WARN $@" >&2; } +tf_error() { echo "${MY_NAME}:ERROR $@" >&2; } +tf_fatal() { echo "${MY_NAME}:FATAL $@" >&2; } + +# generate a random number +tf_generateRandom() +{ + tfgr_random=${tf_RANDOM} + + while [ "${tfgr_random}" = "${tf_RANDOM}" ]; do + if [ -n "${RANDOM:-}" ]; then + # $RANDOM works + tfgr_random=${RANDOM}${RANDOM}${RANDOM}$$ + elif [ -r '/dev/urandom' ]; then + tfgr_random=`od -vAn -N4 -tu4 +# +# Self-testing unit tests for shUnit2 asserts +# + +MSG='This is a test message' + +#----------------------------------------------------------------------------- +# suite tests +# + +commonEqualsSame() +{ + fn=$1 + + msg='same, with message' + rslt=`${fn} "${MSG}" 'x' 'x' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='same' + rslt=`${fn} 'x' 'x' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='not same' + rslt=`${fn} 'x' 'y' 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='null values' + rslt=`${fn} '' '' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='too few arguments' + rslt=`${fn} 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} +} + +testAssertEquals() +{ + commonEqualsSame 'assertEquals' +} + +testAssertSame() +{ + commonEqualsSame 'assertSame' +} + +testAssertNotSame() +{ + msg='not same, with message' + rslt=`assertNotSame "${MSG}" 'x' 'y' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='not same' + rslt=`assertNotSame 'x' 'y' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='same' + rslt=`assertNotSame 'x' 'x' 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='null values' + rslt=`assertNotSame '' '' 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='too few arguments' + rslt=`assertNotSame 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} +} + +testAssertNull() +{ + msg='null, with message' + rslt=`assertNull "${MSG}" '' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='null' + rslt=`assertNull '' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='not null' + rslt=`assertNull 'x' 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='too few arguments' + rslt=`assertNull 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} +} + +testAssertNotNull() +{ + msg='not null, with message' + rslt=`assertNotNull "${MSG}" 'x' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='not null' + rslt=`assertNotNull 'x' 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='null' + rslt=`assertNotNull '' 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='too few arguments' + rslt=`assertNotNull 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} +} + +testAssertTrue() +{ + msg='true, with message' + rslt=`assertTrue "${MSG}" 0 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='true' + rslt=`assertTrue 0 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='true condition' + rslt=`assertTrue "[ 0 -eq 0 ]" 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='false' + rslt=`assertTrue 1 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='false condition' + rslt=`assertTrue "[ 0 -eq 1 ]" 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='null value' + rslt=`assertTrue '' 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='too few arguments' + rslt=`assertTrue 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} +} + +testAssertFalse() +{ + msg='false, with message' + rslt=`assertFalse "${MSG}" 1 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='false' + rslt=`assertFalse 1 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='false condition' + rslt=`assertFalse "[ 0 -eq 1 ]" 2>&1` + rtrn=$? + assertSame "${msg}" '' "${rslt}" + assertTrue "${msg}; failure" ${rtrn} + + msg='true' + rslt=`assertFalse 0 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='true condition' + rslt=`assertFalse "[ 0 -eq 0 ]" 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='null value' + rslt=`assertFalse '' 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} + + msg='too few arguments' + rslt=`assertFalse 2>&1` + rtrn=$? + assertNotSame "${msg}" '' "${rslt}" + assertFalse "${msg}; failure" ${rtrn} +} + +#----------------------------------------------------------------------------- +# suite functions +# + +# load and run shUnit2 +. ./shunit2 diff --git a/contrib/shunit2-2.0.3/src/test/testFailures b/contrib/shunit2-2.0.3/src/test/testFailures new file mode 100755 index 0000000..9410510 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/test/testFailures @@ -0,0 +1,89 @@ +#! /bin/sh +# $Id$ +# vim: expandtab +# author: Kate Ward +# +# Self-testing unit tests for shUnit2 failures +# + +MSG='This is a test message' + +#----------------------------------------------------------------------------- +# suite tests +# + +commonNotEqualsSame() +{ + fn=$1 + + msg='same, with message' + rslt=`${fn} "${MSG}" 'x' 'x' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='same' + rslt=`${fn} 'x' 'x' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='not same' + rslt=`${fn} 'x' 'y' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='null values' + rslt=`${fn} '' '' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='too few arguments' + rslt=`${fn} 2>&1` + assertNotSame "${msg}" '' "${rslt}" +} + +testFail() +{ + msg='with message' + rslt=`fail "${MSG}" 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='without message' + rslt=`fail 2>&1` + assertNotSame "${msg}" '' "${rslt}" +} + +testFailNotEquals() +{ + commonNotEqualsSame 'failNotEquals' +} + +testFailSame() +{ + msg='same, with message' + rslt=`failSame "${MSG}" 'x' 'x' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='same' + rslt=`failSame 'x' 'x' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='not same' + rslt=`failSame 'x' 'y' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='null values' + rslt=`failSame '' '' 2>&1` + assertNotSame "${msg}" '' "${rslt}" + + msg='too few arguments' + rslt=`failSame 2>&1` + assertNotSame "${msg}" '' "${rslt}" +} + +testFailNotSame() +{ + commonNotEqualsSame 'failNotSame' +} + +#----------------------------------------------------------------------------- +# suite functions +# + +# load and run shUnit2 +. ./shunit2 diff --git a/contrib/shunit2-2.0.3/src/test/testInternalFx b/contrib/shunit2-2.0.3/src/test/testInternalFx new file mode 100755 index 0000000..9409dc2 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/test/testInternalFx @@ -0,0 +1,23 @@ +#! /bin/sh +# $Id$ +# vim: expandtab +# author: Kate Ward +# +# Self-testing unit tests for shUnit2 internal functions +# + +#----------------------------------------------------------------------------- +# suite tests +# + +testGenerateReport() +{ + : +} + +#----------------------------------------------------------------------------- +# suite functions +# + +# load and run shUnit2 +. ./shunit2 diff --git a/contrib/shunit2-2.0.3/src/test/testSuiteFx b/contrib/shunit2-2.0.3/src/test/testSuiteFx new file mode 100755 index 0000000..c0e6ab8 --- /dev/null +++ b/contrib/shunit2-2.0.3/src/test/testSuiteFx @@ -0,0 +1,23 @@ +#! /bin/sh +# $Id$ +# vim: expandtab +# author: Kate Ward +# +# Self-testing unit tests for shUnit2 suite functions +# + +#----------------------------------------------------------------------------- +# suite tests +# + +testAddTest() +{ + : +} + +#----------------------------------------------------------------------------- +# suite functions +# + +# load and run shUnit2 +. ./shunit2 diff --git a/test/data/issue26/mydata.bim b/test/data/issue26/mydata.bim deleted file mode 100644 index 6597ab3..0000000 --- a/test/data/issue26/mydata.bim +++ /dev/null @@ -1,2000 +0,0 @@ -12 61823995 0 61823995 A T -1 282891830 0 282891830 T C -9 50466003 0 50466003 A G -16 76439488 0 76439488 G A -1 62197375 0 62197375 C T -1 105170181 0 105170181 C T -7 124862365 0 124862365 A C -10 20807211 0 20807211 G A -13 163532928 0 163532928 T C -5 95385873 0 95385873 G C -13 188878430 0 188878430 A G -5 90729355 0 90729355 T C -10 44711788 0 44711788 G C -13 80012907 0 80012907 T C -10 16939645 0 16939645 A G -11 21324076 0 21324076 C G -4 134225606 0 134225606 A G -3 54564266 0 54564266 G T -3 110081590 0 110081590 G A -10 13376877 0 13376877 C T -16 59909955 0 59909955 G A -9 37243796 0 37243796 G A -7 125595520 0 125595520 T C -15 152252003 0 152252003 A G -3 6704775 0 6704775 T C -18 52974714 0 52974714 T C -6 116323402 0 116323402 T C -6 95660549 0 95660549 G A -6 117831019 0 117831019 C T -14 30963893 0 30963893 A G -20 1357363 0 1357363 A G -6 62973398 0 62973398 C T -13 194879243 0 194879243 G A -7 20136793 0 20136793 G C -18 49227653 0 49227653 A G -13 20545126 0 20545126 G A -13 124769754 0 124769754 A G -13 55459363 0 55459363 T C -20 36850799 0 36850799 A C -13 79449615 0 79449615 A C -12 60245056 0 60245056 A G -17 8832348 0 8832348 C G -8 4032956 0 4032956 T C -1 300800707 0 300800707 C G -3 128145172 0 128145172 T C -15 39797926 0 39797926 A G -1 242719013 0 242719013 T C -12 61578344 0 61578344 A C -9 75392416 0 75392416 T A -17 30753929 0 30753929 T C -2 132759005 0 132759005 C G -8 30799376 0 30799376 T G -5 43961462 0 43961462 T G -5 26953184 0 26953184 A G -8 136962222 0 136962222 G C -15 5467038 0 5467038 G A -1 59770327 0 59770327 C A -16 16719884 0 16719884 A C -15 42151476 0 42151476 T G -15 155227918 0 155227918 G A -11 64875862 0 64875862 T C -2 95736108 0 95736108 C A -7 125632870 0 125632870 T G -15 18748518 0 18748518 G T -9 110404695 0 110404695 T C -9 84789894 0 84789894 G A -3 138725459 0 138725459 G A -2 48165434 0 48165434 T C -1 147316107 0 147316107 T G -15 153965622 0 153965622 A G -8 31040172 0 31040172 T C -8 8848020 0 8848020 T C -18 16034096 0 16034096 G A -9 71303916 0 71303916 G A -17 51072072 0 51072072 T A -16 72142610 0 72142610 T C -14 75909136 0 75909136 C A -11 15956412 0 15956412 G A -18 39375853 0 39375853 T C -2 39290310 0 39290310 C T -3 45397090 0 45397090 A C -13 134706484 0 134706484 T C -13 68124569 0 68124569 A G -6 144792716 0 144792716 T C -3 15586969 0 15586969 A C -13 211298734 0 211298734 T A -3 4925559 0 4925559 G C -15 131494890 0 131494890 A G -8 19818679 0 19818679 G A -15 29671222 0 29671222 G A -14 120240570 0 120240570 T C -9 55906499 0 55906499 T C -8 143093039 0 143093039 G A -2 53956321 0 53956321 A G -14 12570433 0 12570433 C T -17 227481 0 227481 C G -10 33545680 0 33545680 A T -1 309556715 0 309556715 C T -13 31360129 0 31360129 G A -15 50896554 0 50896554 T G -10 11433665 0 11433665 A G -11 52614007 0 52614007 T C -9 49494354 0 49494354 T C -2 52194444 0 52194444 T C -8 76065359 0 76065359 A G -12 41845943 0 41845943 G T -15 11296587 0 11296587 A G -1 238894826 0 238894826 G C -5 30493017 0 30493017 T C -2 128272596 0 128272596 T C -16 79998533 0 79998533 A G -13 71899543 0 71899543 G A -12 7858943 0 7858943 C T -1 10173803 0 10173803 T C -9 132291836 0 132291836 T C -12 43144730 0 43144730 T C -7 12469119 0 12469119 G A -18 30121881 0 30121881 G T -18 29119728 0 29119728 C T -11 45839102 0 45839102 G A -10 49970287 0 49970287 C G -12 40655439 0 40655439 A T -9 48191650 0 48191650 A G -7 118321161 0 118321161 C T -1 303600016 0 303600016 G T -10 65142213 0 65142213 C T -1 30784937 0 30784937 A G -4 136764905 0 136764905 C T -10 65880549 0 65880549 C A -16 731690 0 731690 A T -3 105909011 0 105909011 T A -10 51515713 0 51515713 A G -9 76795863 0 76795863 T A -16 13193234 0 13193234 C A -17 49847784 0 49847784 T C -10 44630798 0 44630798 C T -6 7437881 0 7437881 T C -1 13009976 0 13009976 T C -8 142452409 0 142452409 C T -6 99263022 0 99263022 A G -1 272272950 0 272272950 G C -15 90084248 0 90084248 G A -18 3565525 0 3565525 C T -10 4628644 0 4628644 G A -16 60473896 0 60473896 C A -13 107750318 0 107750318 C T -14 27361664 0 27361664 C G -17 38754156 0 38754156 A T -14 1390226 0 1390226 A G -13 14522299 0 14522299 G A -11 12169012 0 12169012 T C -3 17664671 0 17664671 A G -16 50939676 0 50939676 G A -7 89989547 0 89989547 A G -6 150622139 0 150622139 T C -8 69985997 0 69985997 A T -6 85790751 0 85790751 A G -2 22704579 0 22704579 T A -2 124031143 0 124031143 G A -2 134149272 0 134149272 T C -2 92342394 0 92342394 A G -8 4200692 0 4200692 C T -15 143068379 0 143068379 T A -6 38540212 0 38540212 C G -3 70840990 0 70840990 C G -12 61673795 0 61673795 C A -17 41482632 0 41482632 T C -6 81798359 0 81798359 G C -4 42983424 0 42983424 A G -10 31936612 0 31936612 G A -3 11251394 0 11251394 A G -18 40380221 0 40380221 A C -15 89785774 0 89785774 C A -6 72984509 0 72984509 T C -13 190306221 0 190306221 T C -2 141591597 0 141591597 C A -5 47802076 0 47802076 C G -3 65473215 0 65473215 A T -11 74312667 0 74312667 T C -12 58639506 0 58639506 A C -1 291991758 0 291991758 C A -3 66126102 0 66126102 G C -6 17670188 0 17670188 G A -3 78118235 0 78118235 C G -17 1740047 0 1740047 T C -13 150762473 0 150762473 G A -12 60228600 0 60228600 G A -8 8802707 0 8802707 A G -13 127902114 0 127902114 A T -15 2109085 0 2109085 A G -3 141266425 0 141266425 G A -9 134050738 0 134050738 T C -14 9990669 0 9990669 T G -7 129340673 0 129340673 C T -16 81525555 0 81525555 C T -8 8116313 0 8116313 A G -3 96520208 0 96520208 C T -4 73512013 0 73512013 G A -1 71866224 0 71866224 T C -11 16932324 0 16932324 A G -1 66018762 0 66018762 G A -1 45028653 0 45028653 G A -9 17733065 0 17733065 A G -15 150018987 0 150018987 T C -4 131320922 0 131320922 T C -11 50979472 0 50979472 C A -6 87316990 0 87316990 C A -13 7082028 0 7082028 A G -16 80445920 0 80445920 A C -20 36757585 0 36757585 A T -3 130834781 0 130834781 T C -16 56917430 0 56917430 G A -6 133837639 0 133837639 A T -14 75484764 0 75484764 A T -8 18841250 0 18841250 C T -5 4907804 0 4907804 C T -3 5777777 0 5777777 T G -17 15182354 0 15182354 G A -15 151924778 0 151924778 T C -7 54910409 0 54910409 A G -4 118595820 0 118595820 G A -1 3353709 0 3353709 C T -3 76668954 0 76668954 C T -11 64626153 0 64626153 G A -2 32433962 0 32433962 A G -2 20986243 0 20986243 A G -7 32853137 0 32853137 A C -6 64519325 0 64519325 C T -3 36468714 0 36468714 G T -6 151194650 0 151194650 G A -8 77649891 0 77649891 C T -17 18446538 0 18446538 A G -12 56052208 0 56052208 T C -5 107084292 0 107084292 T C -3 14384588 0 14384588 G C -3 51591906 0 51591906 G A -2 20417355 0 20417355 C T -9 114685180 0 114685180 C T -6 12752901 0 12752901 T C -12 18226967 0 18226967 T C -11 14217908 0 14217908 G C -16 73112048 0 73112048 G A -9 143678095 0 143678095 C T -16 21507832 0 21507832 T C -14 107459949 0 107459949 A G -20 130342171 0 130342171 A G -1 313827334 0 313827334 T C -15 155464254 0 155464254 C A -6 112097780 0 112097780 A C -14 141727195 0 141727195 A G -14 13062693 0 13062693 T C -11 8078650 0 8078650 T C -16 81272536 0 81272536 T A -13 215874427 0 215874427 A G -4 122803984 0 122803984 C G -16 80552008 0 80552008 G A -20 142442781 0 142442781 T A -10 69170417 0 69170417 A G -1 69148896 0 69148896 A G -1 30919429 0 30919429 C T -1 79991590 0 79991590 A G -10 20413606 0 20413606 T A -1 76910707 0 76910707 C T -13 64115202 0 64115202 T G -7 21465952 0 21465952 C G -13 14050752 0 14050752 A G -2 150248190 0 150248190 G A -16 35075101 0 35075101 A T -1 13644267 0 13644267 T C -1 284343176 0 284343176 C T -15 22164281 0 22164281 A G -15 62840644 0 62840644 A C -2 117944089 0 117944089 A C -17 11119188 0 11119188 T C -15 105926797 0 105926797 C T -8 85389150 0 85389150 G A -7 134064771 0 134064771 G A -17 42279862 0 42279862 T C -13 64100842 0 64100842 A G -8 90106498 0 90106498 G A -1 210001362 0 210001362 T C -13 164493367 0 164493367 A G -8 28536755 0 28536755 T C -6 84077740 0 84077740 G C -2 136141640 0 136141640 T C -4 78519550 0 78519550 C T -14 6228950 0 6228950 C A -10 32535402 0 32535402 C T -1 85774348 0 85774348 A G -15 96286027 0 96286027 T C -1 233373604 0 233373604 G A -9 135839488 0 135839488 G A -3 135559919 0 135559919 C T -20 36364914 0 36364914 G A -20 136029945 0 136029945 G A -18 7281961 0 7281961 T C -13 186644754 0 186644754 A T -1 143047482 0 143047482 G A -6 143815799 0 143815799 C T -5 92951991 0 92951991 A T -17 63524024 0 63524024 A G -3 97797040 0 97797040 T C -10 14088771 0 14088771 T G -11 83301864 0 83301864 T C -13 187152307 0 187152307 G A -16 52358402 0 52358402 A G -2 152618590 0 152618590 G A -5 98615217 0 98615217 G A -2 26184887 0 26184887 T C -3 11691385 0 11691385 G A -13 189788238 0 189788238 G A -1 301249718 0 301249718 T C -10 49618341 0 49618341 C A -9 62622023 0 62622023 T A -10 54951382 0 54951382 T C -15 150735654 0 150735654 T G -1 275769323 0 275769323 G A -9 9388947 0 9388947 G C -17 62963054 0 62963054 T C -8 97290291 0 97290291 T C -7 84427129 0 84427129 A G -3 246667 0 246667 G A -7 27455882 0 27455882 G C -2 49340422 0 49340422 C T -1 169308609 0 169308609 C G -1 34727544 0 34727544 G A -3 121206206 0 121206206 A G -7 70069335 0 70069335 T G -20 15883589 0 15883589 G C -5 80518562 0 80518562 A G -11 83011368 0 83011368 T C -14 132845529 0 132845529 C A -7 33718310 0 33718310 A G -12 55539111 0 55539111 T A -16 78093582 0 78093582 T G -14 40535348 0 40535348 T G -3 30458707 0 30458707 A G -7 17453580 0 17453580 G A -14 16460871 0 16460871 A T -10 23940979 0 23940979 A G -2 5328857 0 5328857 C T -14 31393895 0 31393895 T G -2 23255466 0 23255466 C A -15 88367016 0 88367016 C T -1 120221538 0 120221538 A T -6 71284019 0 71284019 T C -6 151501020 0 151501020 C T -13 14328475 0 14328475 T C -11 56191683 0 56191683 A G -10 7818215 0 7818215 A T -9 147653548 0 147653548 G C -8 30124002 0 30124002 T C -8 35617887 0 35617887 C T -5 62757114 0 62757114 T C -10 49173006 0 49173006 G A -4 13158241 0 13158241 C T -7 98233924 0 98233924 A G -9 75827098 0 75827098 G A -12 7498944 0 7498944 G C -2 18828260 0 18828260 A G -10 13208938 0 13208938 A C -3 14781220 0 14781220 C T -13 86265979 0 86265979 A G -1 97112556 0 97112556 T C -13 44682500 0 44682500 C T -2 96621657 0 96621657 G A -17 15433803 0 15433803 G A -1 41735685 0 41735685 T C -10 67045163 0 67045163 C G -13 191226350 0 191226350 T C -3 121666967 0 121666967 G A -14 72417550 0 72417550 A G -11 55698697 0 55698697 A G -6 126023211 0 126023211 A G -11 20141681 0 20141681 G A -4 84525963 0 84525963 T C -15 33771559 0 33771559 G A -15 94110137 0 94110137 C T -11 85351705 0 85351705 G A -13 209615063 0 209615063 T C -5 23668458 0 23668458 G A -7 70433603 0 70433603 T C -11 78938633 0 78938633 T C -8 138172617 0 138172617 G A -3 14240323 0 14240323 A G -12 15015323 0 15015323 T C -13 14655511 0 14655511 A G -9 99860282 0 99860282 A T -10 33787703 0 33787703 A G -2 132478302 0 132478302 G A -18 50658297 0 50658297 C T -5 104140444 0 104140444 A C -1 286206720 0 286206720 A G -3 114479332 0 114479332 G A -16 19555448 0 19555448 C T -20 76604509 0 76604509 A C -1 94891438 0 94891438 T A -14 16379564 0 16379564 G A -20 10572867 0 10572867 A G -13 22550427 0 22550427 T C -12 49110593 0 49110593 T C -18 42279615 0 42279615 A G -7 128989672 0 128989672 C T -13 59042442 0 59042442 T C -11 74838600 0 74838600 G A -14 103296456 0 103296456 G T -6 140127917 0 140127917 G A -4 11171154 0 11171154 C T -7 87092373 0 87092373 G A -1 56413580 0 56413580 C T -1 98251074 0 98251074 C A -1 93436484 0 93436484 T C -3 20180691 0 20180691 A T -16 20450961 0 20450961 G A -4 82604036 0 82604036 C T -4 137647483 0 137647483 A G -2 130831432 0 130831432 C T -6 131782683 0 131782683 T A -15 106368302 0 106368302 A T -7 75959365 0 75959365 C T -15 135551029 0 135551029 G T -8 71845635 0 71845635 A C -17 33115447 0 33115447 G A -1 73567974 0 73567974 C A -1 271482421 0 271482421 A G -1 200737668 0 200737668 G A -3 48658440 0 48658440 T C -17 47601269 0 47601269 G A -14 27689863 0 27689863 G A -5 99806740 0 99806740 A G -1 10164562 0 10164562 G A -6 31583052 0 31583052 C T -1 16249300 0 16249300 A G -6 147663125 0 147663125 T G -9 100575473 0 100575473 G A -18 51820993 0 51820993 C T -13 210509351 0 210509351 C T -2 26602555 0 26602555 T G -1 23350865 0 23350865 A G -4 16723561 0 16723561 G T -20 8467691 0 8467691 G A -14 146602778 0 146602778 T G -12 15219591 0 15219591 G A -16 4278018 0 4278018 G A -9 142184407 0 142184407 G A -9 116626906 0 116626906 G T -6 139971231 0 139971231 G A -14 145170486 0 145170486 A G -18 13946497 0 13946497 A G -15 59818850 0 59818850 G A -2 12277750 0 12277750 T G -9 77697230 0 77697230 G T -2 127513878 0 127513878 T A -18 30306980 0 30306980 G T -1 15949431 0 15949431 A G -11 20918277 0 20918277 C T -9 74811170 0 74811170 T C -15 145546644 0 145546644 C T -14 65679084 0 65679084 C T -14 65389313 0 65389313 T C -2 15676031 0 15676031 T C -1 286094306 0 286094306 C T -5 100340071 0 100340071 C G -7 27863850 0 27863850 G A -3 21793090 0 21793090 A G -17 61030140 0 61030140 T A -3 97574759 0 97574759 C T -16 31741016 0 31741016 A C -20 19642167 0 19642167 T C -17 69681143 0 69681143 G A -14 85427954 0 85427954 G C -8 8136277 0 8136277 T A -7 112079491 0 112079491 C T -1 51009498 0 51009498 C T -1 206476554 0 206476554 C T -7 49953896 0 49953896 G A -15 59703619 0 59703619 T G -13 144301313 0 144301313 C T -5 12839837 0 12839837 G C -8 3532324 0 3532324 A G -12 42899808 0 42899808 G T -4 27334721 0 27334721 G A -13 8328703 0 8328703 T A -17 57066983 0 57066983 G A -14 41492435 0 41492435 G C -17 12588040 0 12588040 G T -2 12267776 0 12267776 T A -1 124317360 0 124317360 T C -20 76889555 0 76889555 A C -5 1633375 0 1633375 T C -8 6199723 0 6199723 C T -6 34331269 0 34331269 C T -18 37018993 0 37018993 G A -13 61538454 0 61538454 T G -20 41854314 0 41854314 C A -13 7641189 0 7641189 C T -1 162675674 0 162675674 T A -7 81697588 0 81697588 T G -4 19758706 0 19758706 C T -14 145684237 0 145684237 A G -7 133227876 0 133227876 C A -7 87088901 0 87088901 A G -5 20660261 0 20660261 C G -1 8758985 0 8758985 C G -14 127284737 0 127284737 T C -13 44566974 0 44566974 C T -7 95039982 0 95039982 A T -15 33166207 0 33166207 C T -4 85520507 0 85520507 G A -20 14656574 0 14656574 C T -6 133494337 0 133494337 G C -12 11927412 0 11927412 C T -8 74256299 0 74256299 A G -6 65511305 0 65511305 T C -14 149272564 0 149272564 C A -5 92119005 0 92119005 T A -2 10326223 0 10326223 A G -14 15628551 0 15628551 C T -15 36030203 0 36030203 G T -10 76942175 0 76942175 T C -20 35822548 0 35822548 C A -15 121220434 0 121220434 T C -6 15351631 0 15351631 A G -9 50254160 0 50254160 T C -14 87913161 0 87913161 A G -15 16896184 0 16896184 A G -16 47036191 0 47036191 T C -17 5462355 0 5462355 G A -4 85395848 0 85395848 T C -14 6526551 0 6526551 C A -16 16152577 0 16152577 G A -9 17440492 0 17440492 A C -2 115071398 0 115071398 A T -10 30537344 0 30537344 T G -6 89770572 0 89770572 C T -9 85350554 0 85350554 T G -12 3899019 0 3899019 A G -16 70599278 0 70599278 G A -18 54909867 0 54909867 T C -13 212249566 0 212249566 A G -11 23898519 0 23898519 T C -10 44576995 0 44576995 G A -7 119364090 0 119364090 A G -13 33549812 0 33549812 T C -5 12685691 0 12685691 A G -13 148569950 0 148569950 G A -8 90511062 0 90511062 T C -15 144855535 0 144855535 C T -9 100849622 0 100849622 C A -8 8974026 0 8974026 G A -1 282425461 0 282425461 A G -2 68749184 0 68749184 A T -2 70181238 0 70181238 T C -9 114779496 0 114779496 C T -11 79626429 0 79626429 C T -3 78521892 0 78521892 A C -17 34929442 0 34929442 T A -4 5857281 0 5857281 T C -2 120455301 0 120455301 T G -6 151680542 0 151680542 T A -2 9826151 0 9826151 A G -2 147109852 0 147109852 G T -17 67278395 0 67278395 T C -1 289526806 0 289526806 A G -8 22863076 0 22863076 T G -4 16343553 0 16343553 C T -17 43520105 0 43520105 A G -7 89797722 0 89797722 C T -9 101445217 0 101445217 G A -5 77739796 0 77739796 T G -13 170271563 0 170271563 C T -3 133551743 0 133551743 T C -18 10317894 0 10317894 T C -9 55935142 0 55935142 T A -6 140658519 0 140658519 C A -12 32395137 0 32395137 T C -13 128428864 0 128428864 T C -14 40174693 0 40174693 A G -7 51125396 0 51125396 A T -16 21571017 0 21571017 C T -6 4731719 0 4731719 A G -3 100059917 0 100059917 C G -17 6187441 0 6187441 C T -7 95650655 0 95650655 T C -10 11384368 0 11384368 T G -4 79262080 0 79262080 C T -7 14545333 0 14545333 A T -3 133994646 0 133994646 C G -6 70757234 0 70757234 T C -18 26739385 0 26739385 A C -6 146532541 0 146532541 G A -17 5648752 0 5648752 C T -4 35618850 0 35618850 C T -4 72628522 0 72628522 C T -4 1978214 0 1978214 G A -6 76798447 0 76798447 G T -1 284965822 0 284965822 C T -2 65499487 0 65499487 A T -6 17216342 0 17216342 C T -10 38972348 0 38972348 A C -20 45528892 0 45528892 T G -15 1942634 0 1942634 A T -15 29839530 0 29839530 C T -1 286229871 0 286229871 G A -16 37867753 0 37867753 C T -6 82453944 0 82453944 C T -17 38441331 0 38441331 A G -14 89433023 0 89433023 A G -9 123751811 0 123751811 A C -4 101513535 0 101513535 T G -10 42244255 0 42244255 A T -4 37562729 0 37562729 T G -14 141733813 0 141733813 T C -8 27378268 0 27378268 T C -14 42178283 0 42178283 T C -13 15039671 0 15039671 G C -14 76456077 0 76456077 C G -2 9763835 0 9763835 A C -3 16077481 0 16077481 C G -6 76778012 0 76778012 C T -18 259087 0 259087 C T -1 17903940 0 17903940 T C -9 139161401 0 139161401 C T -13 184347786 0 184347786 C T -7 87675977 0 87675977 A C -3 48960463 0 48960463 A G -5 88004364 0 88004364 C T -9 147840358 0 147840358 A G -4 23731863 0 23731863 A C -17 20652640 0 20652640 A T -17 9805693 0 9805693 G T -8 3119286 0 3119286 G A -11 13162502 0 13162502 A G -7 87020698 0 87020698 A G -5 49747588 0 49747588 A G -4 7797455 0 7797455 T C -5 10580563 0 10580563 A G -7 75556595 0 75556595 A G -9 85667151 0 85667151 T C -8 116940740 0 116940740 T C -6 65831642 0 65831642 C T -14 111750119 0 111750119 C T -2 90146430 0 90146430 A G -8 9159796 0 9159796 A G -3 31006694 0 31006694 G A -14 57610861 0 57610861 A G -10 1052345 0 1052345 G A -11 44600330 0 44600330 T G -10 73272214 0 73272214 T C -8 28650429 0 28650429 T C -9 114533123 0 114533123 C T -18 41016686 0 41016686 C T -2 121657117 0 121657117 T G -17 11209710 0 11209710 T G -2 109794758 0 109794758 C T -14 44361646 0 44361646 T C -14 33272172 0 33272172 A T -16 84032760 0 84032760 C T -1 62623561 0 62623561 A G -3 77678959 0 77678959 A T -1 75331034 0 75331034 C T -1 262727977 0 262727977 T C -17 18997988 0 18997988 T C -10 66740119 0 66740119 G A -10 73580665 0 73580665 T C -2 29201801 0 29201801 T C -9 142662930 0 142662930 T C -1 279721673 0 279721673 A T -13 203600324 0 203600324 G A -2 18107902 0 18107902 G A -6 72061743 0 72061743 A G -7 11842794 0 11842794 A G -18 2461353 0 2461353 T G -8 937111 0 937111 A G -1 31779391 0 31779391 T C -10 44353804 0 44353804 A G -6 116275607 0 116275607 G A -15 42105353 0 42105353 G T -8 20426299 0 20426299 T C -8 125558945 0 125558945 T A -15 134823079 0 134823079 T C -14 131313454 0 131313454 A T -6 74065164 0 74065164 T C -4 14624636 0 14624636 A G -15 27964550 0 27964550 T C -1 267228859 0 267228859 T G -5 95947450 0 95947450 T C -2 105789198 0 105789198 A G -4 90793612 0 90793612 T C -10 44698845 0 44698845 G T -14 14162587 0 14162587 C T -10 1649364 0 1649364 A G -10 9265504 0 9265504 A G -1 13506661 0 13506661 T C -13 217126469 0 217126469 C T -16 34183858 0 34183858 T C -14 141778757 0 141778757 A G -3 100935147 0 100935147 A G -7 46345888 0 46345888 A T -18 17727504 0 17727504 A G -2 145334673 0 145334673 A G -20 125541763 0 125541763 C A -2 12009342 0 12009342 T C -13 198495474 0 198495474 C T -14 97017394 0 97017394 G A -10 15636489 0 15636489 G A -12 62413420 0 62413420 C T -13 13280518 0 13280518 T A -12 55900057 0 55900057 T C -13 116165606 0 116165606 G C -9 130877836 0 130877836 T C -3 141158365 0 141158365 T C -9 15866357 0 15866357 A G -2 89581197 0 89581197 A C -3 91259127 0 91259127 T G -1 42088 0 42088 A C -20 20032100 0 20032100 T C -20 36928336 0 36928336 C G -11 81404660 0 81404660 G A -8 140383681 0 140383681 C T -9 18679902 0 18679902 T C -16 14240364 0 14240364 A G -13 211406395 0 211406395 T C -3 90076839 0 90076839 G T -11 34890166 0 34890166 T C -2 105119227 0 105119227 A C -6 84569556 0 84569556 T C -10 16532355 0 16532355 A G -13 136966253 0 136966253 G A -9 38342616 0 38342616 G T -13 26088264 0 26088264 A G -1 192871124 0 192871124 A C -14 17231634 0 17231634 G T -2 161882218 0 161882218 A G -15 92907319 0 92907319 G C -3 60429590 0 60429590 A G -4 80865578 0 80865578 G T -9 84403842 0 84403842 G A -1 269371508 0 269371508 T C -14 73291517 0 73291517 C T -13 8159104 0 8159104 C T -4 100420522 0 100420522 C T -4 37058988 0 37058988 C A -1 91783819 0 91783819 T A -8 49347168 0 49347168 C T -9 90587675 0 90587675 T G -9 134024967 0 134024967 T C -8 42357149 0 42357149 C T -18 14236809 0 14236809 G A -7 130411137 0 130411137 C T -18 43156331 0 43156331 T G -7 31245542 0 31245542 T C -1 7350796 0 7350796 G A -10 66988609 0 66988609 T C -10 59544455 0 59544455 A C -11 83961480 0 83961480 G A -1 230195792 0 230195792 T C -15 36622064 0 36622064 A G -18 10990015 0 10990015 A G -8 37842570 0 37842570 G T -13 178600990 0 178600990 G A -9 141349581 0 141349581 G A -4 127532239 0 127532239 C T -3 51833657 0 51833657 C A -1 222699988 0 222699988 A T -8 141934275 0 141934275 T C -5 99093470 0 99093470 A G -14 134565000 0 134565000 C T -4 55443503 0 55443503 G T -17 14119756 0 14119756 T G -9 4236385 0 4236385 A G -1 90022009 0 90022009 C T -15 156092153 0 156092153 T C -10 11328436 0 11328436 C T -17 63281720 0 63281720 A G -18 8848602 0 8848602 A G -1 27918808 0 27918808 T C -7 72055761 0 72055761 A C -2 140098424 0 140098424 T A -15 29270226 0 29270226 T C -7 39616751 0 39616751 T A -2 114411844 0 114411844 G A -12 7143340 0 7143340 A G -13 207601190 0 207601190 C T -12 42570693 0 42570693 G A -8 123176551 0 123176551 T C -1 228824372 0 228824372 A G -18 14033881 0 14033881 A G -5 25135106 0 25135106 A G -7 65889439 0 65889439 G A -8 130689350 0 130689350 C A -6 17276021 0 17276021 C G -9 6508610 0 6508610 G A -10 41419850 0 41419850 T C -5 24425 0 24425 G A -2 10318944 0 10318944 T G -13 195691033 0 195691033 A G -2 14947864 0 14947864 G T -8 13116379 0 13116379 G A -20 10003209 0 10003209 G T -2 144553618 0 144553618 T C -1 116064718 0 116064718 G C -9 118720641 0 118720641 G C -17 44633394 0 44633394 A G -5 106967836 0 106967836 G A -14 31924160 0 31924160 A G -18 48258259 0 48258259 C T -1 253154294 0 253154294 C T -7 7132381 0 7132381 C T -8 74827030 0 74827030 C T -1 25053160 0 25053160 T C -9 146760295 0 146760295 C T -13 165280904 0 165280904 C T -2 17399628 0 17399628 A T -7 49693519 0 49693519 T G -13 99288779 0 99288779 G C -6 117340864 0 117340864 T C -9 106526191 0 106526191 C A -13 112099018 0 112099018 G A -11 64404973 0 64404973 T G -1 185145886 0 185145886 C T -1 30777607 0 30777607 G T -15 155456634 0 155456634 A G -18 46400806 0 46400806 C T -1 76568562 0 76568562 G T -12 60721913 0 60721913 A G -20 47182015 0 47182015 C T -4 132470515 0 132470515 G A -13 21378049 0 21378049 A C -7 57654353 0 57654353 A G -14 136988408 0 136988408 T C -2 29129018 0 29129018 G A -3 90181551 0 90181551 A C -13 163602504 0 163602504 G A -15 72505793 0 72505793 C T -3 6036320 0 6036320 G C -13 203956884 0 203956884 G A -6 151997499 0 151997499 A T -18 9538673 0 9538673 G A -10 13773075 0 13773075 C A -20 26403070 0 26403070 G A -6 116227552 0 116227552 A G -15 100170234 0 100170234 T A -10 61226361 0 61226361 A G -9 18491157 0 18491157 C T -8 75761495 0 75761495 A G -8 79532006 0 79532006 A G -16 21594099 0 21594099 A T -18 20596187 0 20596187 T C -10 3487898 0 3487898 C T -14 133571396 0 133571396 T C -1 35806887 0 35806887 G A -11 86378054 0 86378054 C T -10 52736622 0 52736622 C T -15 57956753 0 57956753 T C -1 123380629 0 123380629 A G -8 147023117 0 147023117 T A -9 148656967 0 148656967 G T -3 117527913 0 117527913 A G -7 93854630 0 93854630 T C -9 49729680 0 49729680 G C -8 32088883 0 32088883 C T -9 7961831 0 7961831 C T -6 2689720 0 2689720 T C -11 72344745 0 72344745 G C -6 155420147 0 155420147 C T -7 21569407 0 21569407 C A -3 79507678 0 79507678 A T -6 7359792 0 7359792 C G -1 236473465 0 236473465 C T -10 17323372 0 17323372 T G -12 6867702 0 6867702 C T -11 52144982 0 52144982 T A -4 31296724 0 31296724 C G -6 93536876 0 93536876 C T -1 300822565 0 300822565 A C -8 79237851 0 79237851 A G -14 9933488 0 9933488 A C -3 4015455 0 4015455 T C -7 49692933 0 49692933 T C -1 278999934 0 278999934 A G -2 156575714 0 156575714 C T -14 58864947 0 58864947 G C -10 63427949 0 63427949 G A -3 128787116 0 128787116 C T -9 36897422 0 36897422 T C -7 65935431 0 65935431 C A -7 52078381 0 52078381 T C -7 57147172 0 57147172 C G -10 44924031 0 44924031 A G -4 34159508 0 34159508 A C -10 10269542 0 10269542 G A -8 75958762 0 75958762 G C -2 136888764 0 136888764 G A -13 108834373 0 108834373 A C -13 192574596 0 192574596 T C -1 109669860 0 109669860 T G -1 59533169 0 59533169 T G -13 205192102 0 205192102 G A -15 101622230 0 101622230 T C -16 75468029 0 75468029 A T -3 103390946 0 103390946 G A -5 35551199 0 35551199 C T -1 311316387 0 311316387 T C -14 8961325 0 8961325 C G -14 79687586 0 79687586 T G -13 208867696 0 208867696 A G -3 138512650 0 138512650 A G -9 152382841 0 152382841 G A -13 52595925 0 52595925 C T -4 5800206 0 5800206 G A -8 133596869 0 133596869 C A -2 112142209 0 112142209 G C -16 48993432 0 48993432 A G -1 32894874 0 32894874 C T -12 61826493 0 61826493 G A -10 52844350 0 52844350 T G -20 44234631 0 44234631 C T -7 128425649 0 128425649 C T -8 15806746 0 15806746 T C -10 52119900 0 52119900 T C -5 14612638 0 14612638 G A -13 98600196 0 98600196 G T -7 4996002 0 4996002 G A -4 111416662 0 111416662 T C -8 10895474 0 10895474 G A -2 17911982 0 17911982 G A -7 54949769 0 54949769 T C -5 62347016 0 62347016 A G -17 21296963 0 21296963 G C -1 105973116 0 105973116 T C -2 76585897 0 76585897 G A -4 29865392 0 29865392 A G -15 130641134 0 130641134 A G -1 292605794 0 292605794 G A -9 119179810 0 119179810 G A -2 155195803 0 155195803 C T -1 308566360 0 308566360 G A -5 67729359 0 67729359 T C -8 71794691 0 71794691 A G -4 8649332 0 8649332 A G -2 144494273 0 144494273 G A -1 74868329 0 74868329 A T -10 4342202 0 4342202 T C -15 23470029 0 23470029 T C -7 129265186 0 129265186 G A -6 127247571 0 127247571 T C -10 43941121 0 43941121 A C -10 43943234 0 43943234 A G -13 5890725 0 5890725 G T -2 48920899 0 48920899 T C -4 30980547 0 30980547 G A -6 145658083 0 145658083 C T -4 132774484 0 132774484 C A -2 133009880 0 133009880 G A -8 1628283 0 1628283 C T -7 84802833 0 84802833 A T -7 3402160 0 3402160 A C -16 73739316 0 73739316 T C -8 65849610 0 65849610 C T -9 4227246 0 4227246 C T -2 44700764 0 44700764 G A -15 41506554 0 41506554 G A -1 52130336 0 52130336 G C -2 124968319 0 124968319 A G -18 7983183 0 7983183 G A -10 2303574 0 2303574 A G -1 26627770 0 26627770 G A -10 60969700 0 60969700 C G -11 63911902 0 63911902 A G -6 123725741 0 123725741 G A -13 96158901 0 96158901 T C -2 111357516 0 111357516 G T -4 85197599 0 85197599 A G -15 121200139 0 121200139 G A -15 60261762 0 60261762 A G -15 53558144 0 53558144 G T -3 94683902 0 94683902 A G -14 134659649 0 134659649 A G -2 111204950 0 111204950 C A -7 6627891 0 6627891 A G -7 98634324 0 98634324 T C -4 107551691 0 107551691 T C -6 125353553 0 125353553 A G -10 47492765 0 47492765 C G -3 22241935 0 22241935 C A -4 97215890 0 97215890 A G -2 45298401 0 45298401 A C -20 10397945 0 10397945 T C -13 183264070 0 183264070 G A -6 74883524 0 74883524 A G -10 78760685 0 78760685 A G -8 144350175 0 144350175 T C -9 141701443 0 141701443 G C -14 141417102 0 141417102 T C -4 135211001 0 135211001 C T -4 142886045 0 142886045 G A -2 153835320 0 153835320 C T -13 67442719 0 67442719 A C -13 163375223 0 163375223 G A -14 16122189 0 16122189 C T -3 19968002 0 19968002 C G -1 129834658 0 129834658 A G -8 130169574 0 130169574 T C -3 64477711 0 64477711 G A -11 12177171 0 12177171 T C -17 9747743 0 9747743 T C -16 35767953 0 35767953 G A -7 15714152 0 15714152 G A -9 47406233 0 47406233 T C -2 62611542 0 62611542 T C -6 121653321 0 121653321 C T -13 60249575 0 60249575 C G -11 58276073 0 58276073 C G -18 54783853 0 54783853 A T -8 147057102 0 147057102 A C -5 72476474 0 72476474 T G -7 119589306 0 119589306 G C -6 39875080 0 39875080 T C -13 173119239 0 173119239 A G -14 64662011 0 64662011 A C -15 61857879 0 61857879 A G -8 127061286 0 127061286 A C -10 66966195 0 66966195 A G -1 265168963 0 265168963 A G -7 30684360 0 30684360 C G -14 136925611 0 136925611 G A -15 87640671 0 87640671 T A -4 4635189 0 4635189 A T -2 14706785 0 14706785 A G -3 105855775 0 105855775 A T -15 142476882 0 142476882 G C -12 4313076 0 4313076 T C -1 122356705 0 122356705 G T -14 59253105 0 59253105 G A -14 15229056 0 15229056 A G -16 73488863 0 73488863 C A -17 11668227 0 11668227 G A -11 70510046 0 70510046 G C -8 83899840 0 83899840 G A -5 20905733 0 20905733 G A -5 14355119 0 14355119 A C -15 37978329 0 37978329 T C -6 5606349 0 5606349 G A -4 17638651 0 17638651 G A -8 2684857 0 2684857 T C -11 11009584 0 11009584 A G -3 138222065 0 138222065 G A -20 35211274 0 35211274 G T -18 42602794 0 42602794 T C -8 41935048 0 41935048 C A -10 50803000 0 50803000 C A -1 288432902 0 288432902 A T -14 66014372 0 66014372 C G -13 94546163 0 94546163 T G -2 124828373 0 124828373 C G -9 28535174 0 28535174 T C -8 129251937 0 129251937 G C -13 4802184 0 4802184 G A -13 10706620 0 10706620 A G -13 103838351 0 103838351 T G -9 150966865 0 150966865 A G -11 83011336 0 83011336 A G -4 4041678 0 4041678 C A -2 110909865 0 110909865 C T -7 98236864 0 98236864 A G -15 151375376 0 151375376 G C -12 61499612 0 61499612 G C -6 11372747 0 11372747 A C -17 62703231 0 62703231 G A -6 66723655 0 66723655 G C -10 46925701 0 46925701 T C -15 121157746 0 121157746 T A -3 34502645 0 34502645 A C -8 5207934 0 5207934 A G -9 17845399 0 17845399 A G -10 70577696 0 70577696 C T -1 248834612 0 248834612 A T -12 59946079 0 59946079 G A -1 65161055 0 65161055 A C -1 60911973 0 60911973 T C -8 93565374 0 93565374 T G -6 142527535 0 142527535 G T -12 16868103 0 16868103 T C -7 33713347 0 33713347 A G -18 12261252 0 12261252 T C -8 143449797 0 143449797 C T -14 28269354 0 28269354 A G -1 256149548 0 256149548 C T -14 23301052 0 23301052 C T -7 39384577 0 39384577 T C -12 19653803 0 19653803 A G -12 15911356 0 15911356 G T -20 17253852 0 17253852 G A -16 53089700 0 53089700 T G -5 96555070 0 96555070 T G -2 129941157 0 129941157 A G -13 192813181 0 192813181 G A -6 3638204 0 3638204 G A -5 1258713 0 1258713 T C -12 47514348 0 47514348 A G -12 9971464 0 9971464 G A -17 25091069 0 25091069 C A -15 36821978 0 36821978 T A -1 80595576 0 80595576 C T -17 12617051 0 12617051 C T -13 16197841 0 16197841 G T -3 89324451 0 89324451 T C -14 123263872 0 123263872 G A -14 146426911 0 146426911 T C -11 78723872 0 78723872 A G -7 17053924 0 17053924 T C -18 23172145 0 23172145 C G -13 217770966 0 217770966 T C -2 155074183 0 155074183 C T -6 19026112 0 19026112 A T -16 23879394 0 23879394 C T -8 124218026 0 124218026 A G -4 64249364 0 64249364 G A -12 32128346 0 32128346 G A -1 29056527 0 29056527 A G -17 46471005 0 46471005 A G -11 82338195 0 82338195 A T -17 64867909 0 64867909 G A -11 75650441 0 75650441 A G -17 40227258 0 40227258 C T -14 7653073 0 7653073 C T -1 193599236 0 193599236 G A -16 48745117 0 48745117 G A -5 77413827 0 77413827 T C -13 7142650 0 7142650 A G -12 34488893 0 34488893 C T -10 23668021 0 23668021 C T -6 35763086 0 35763086 T C -2 10515647 0 10515647 T C -4 29814446 0 29814446 G A -3 20711296 0 20711296 G C -8 129293293 0 129293293 G T -5 70535528 0 70535528 T C -3 48410423 0 48410423 G A -14 97211434 0 97211434 T C -4 103691587 0 103691587 A G -3 77242844 0 77242844 A C -6 113408706 0 113408706 G A -16 82505471 0 82505471 T C -6 65369263 0 65369263 G A -1 189484573 0 189484573 T C -1 300213614 0 300213614 T C -1 305869253 0 305869253 C A -1 191440652 0 191440652 T C -15 53470583 0 53470583 A G -20 22733207 0 22733207 T C -20 113329983 0 113329983 T C -14 64666942 0 64666942 A G -14 104493191 0 104493191 C T -12 20772067 0 20772067 T C -3 102594124 0 102594124 G A -16 65218777 0 65218777 C T -1 143912542 0 143912542 T C -10 59664672 0 59664672 A G -9 37933204 0 37933204 T C -6 11296008 0 11296008 C T -13 164568638 0 164568638 A G -3 60666450 0 60666450 G A -8 108727025 0 108727025 T C -9 150228799 0 150228799 T A -17 47123165 0 47123165 C T -1 60707416 0 60707416 G A -4 34035505 0 34035505 T C -2 20825822 0 20825822 A G -4 18554586 0 18554586 A C -2 78394055 0 78394055 T G -9 100368714 0 100368714 T C -15 121368619 0 121368619 C T -3 69578381 0 69578381 A G -10 22997344 0 22997344 A C -2 8510146 0 8510146 A G -3 117630019 0 117630019 G T -9 17852802 0 17852802 T C -9 152487411 0 152487411 C G -13 44268667 0 44268667 T G -9 7606124 0 7606124 A T -8 88035435 0 88035435 T C -7 31556828 0 31556828 A G -5 17907397 0 17907397 T C -6 29950036 0 29950036 A G -14 35294185 0 35294185 T A -12 14712367 0 14712367 C T -2 30930048 0 30930048 C T -17 65563458 0 65563458 T C -15 148072897 0 148072897 A G -7 95903902 0 95903902 A G -15 132542275 0 132542275 A G -10 231886 0 231886 C T -20 26747911 0 26747911 G C -15 10959279 0 10959279 T C -7 11409810 0 11409810 G A -5 68145721 0 68145721 G A -2 142479389 0 142479389 A G -9 89705969 0 89705969 C A -13 199786167 0 199786167 C T -4 137241163 0 137241163 T C -2 125572211 0 125572211 G A -2 134873838 0 134873838 C A -4 135021423 0 135021423 T C -10 63888857 0 63888857 A G -6 33769333 0 33769333 G A -8 7993051 0 7993051 T C -12 18482453 0 18482453 A G -6 8557810 0 8557810 G A -8 6204504 0 6204504 T C -8 144344603 0 144344603 T A -13 57714817 0 57714817 T C -15 131468802 0 131468802 G A -15 121433296 0 121433296 G A -7 113830913 0 113830913 G T -4 16685469 0 16685469 C T -6 11368841 0 11368841 T C -16 57712190 0 57712190 C A -9 70123672 0 70123672 A G -18 57251610 0 57251610 C T -6 154111594 0 154111594 T C -11 73952837 0 73952837 T C -2 79332957 0 79332957 G A -10 43254412 0 43254412 C T -18 6834807 0 6834807 G C -2 48278731 0 48278731 C T -7 5205507 0 5205507 A T -13 21239581 0 21239581 C T -2 147545926 0 147545926 C T -9 23869252 0 23869252 G A -8 105206307 0 105206307 A G -16 73446861 0 73446861 A T -4 2123722 0 2123722 G A -1 185160664 0 185160664 A G -3 51589501 0 51589501 G T -4 134103660 0 134103660 T C -20 46133203 0 46133203 T A -5 30432183 0 30432183 A C -2 14686673 0 14686673 G A -16 82804037 0 82804037 A G -17 29514871 0 29514871 C A -5 43044691 0 43044691 A C -17 14183244 0 14183244 C G -4 131972823 0 131972823 A G -14 109159365 0 109159365 C T -4 35637138 0 35637138 A G -1 2043110 0 2043110 A G -1 309371631 0 309371631 G A -13 52326307 0 52326307 A G -13 189916149 0 189916149 T C -10 49139183 0 49139183 T C -17 51440948 0 51440948 T C -20 121503249 0 121503249 A C -10 49973254 0 49973254 T C -1 312224167 0 312224167 C A -15 3814450 0 3814450 T G -17 52233894 0 52233894 C T -7 52643912 0 52643912 C T -15 145716010 0 145716010 A G -9 20200401 0 20200401 C T -11 80650777 0 80650777 T C -1 272273251 0 272273251 C A -1 116976389 0 116976389 T C -8 137482504 0 137482504 A G -6 125177771 0 125177771 C T -6 33640574 0 33640574 T C -1 147993290 0 147993290 C T -7 56285568 0 56285568 T G -9 33538168 0 33538168 G A -11 65273598 0 65273598 G C -11 83316193 0 83316193 C A -4 34165438 0 34165438 T C -8 140389977 0 140389977 G A -14 78778057 0 78778057 T C -7 121297706 0 121297706 G A -16 79033850 0 79033850 C T -20 30042207 0 30042207 A G -8 26409239 0 26409239 A G -13 3602504 0 3602504 C G -7 44856955 0 44856955 G A -16 80245251 0 80245251 A G -8 27739616 0 27739616 A G -7 53738334 0 53738334 C T -13 30724289 0 30724289 G T -8 27147916 0 27147916 C A -1 281998805 0 281998805 T A -11 24173514 0 24173514 T C -9 30311926 0 30311926 C T -9 40503219 0 40503219 G T -11 84717631 0 84717631 A T -1 57048309 0 57048309 G T -7 79735297 0 79735297 T C -10 15324381 0 15324381 G C -12 48969234 0 48969234 C G -4 12061490 0 12061490 T C -12 62681337 0 62681337 C T -8 113164465 0 113164465 A T -6 39921421 0 39921421 T C -13 101401337 0 101401337 A G -3 54209438 0 54209438 A G -9 24542087 0 24542087 A T -15 54752488 0 54752488 G T -8 109793220 0 109793220 A C -10 70675769 0 70675769 A G -1 249437934 0 249437934 T G -17 52660613 0 52660613 T C -10 9237855 0 9237855 T C -7 70162243 0 70162243 C T -9 135619104 0 135619104 C T -13 164471739 0 164471739 C T -5 26819497 0 26819497 G A -3 103036153 0 103036153 G A -20 14388992 0 14388992 G C -14 136934349 0 136934349 T A -3 87018973 0 87018973 C A -15 38143952 0 38143952 T C -17 62135653 0 62135653 T A -17 67498547 0 67498547 C A -18 18568818 0 18568818 C T -20 7444454 0 7444454 T A -18 7457056 0 7457056 A G -20 136262270 0 136262270 C T -8 29603286 0 29603286 A C -15 149517298 0 149517298 C T -20 137979946 0 137979946 T C -7 14423877 0 14423877 A T -20 15980112 0 15980112 C T -5 69134665 0 69134665 A G -1 20820628 0 20820628 C A -14 78494263 0 78494263 C G -14 89433306 0 89433306 T C -10 3976326 0 3976326 C T -11 39827047 0 39827047 C T -1 199903670 0 199903670 G C -17 56387765 0 56387765 A C -18 48234989 0 48234989 A T -8 10879742 0 10879742 A G -2 13482295 0 13482295 C T -7 70162511 0 70162511 G A -13 167053165 0 167053165 G A -1 292602867 0 292602867 C T -17 46381165 0 46381165 T C -7 128213999 0 128213999 T C -7 1705496 0 1705496 T C -5 111473189 0 111473189 G C -9 20213327 0 20213327 T C -13 7990092 0 7990092 G A -11 9069427 0 9069427 T C -14 64272029 0 64272029 A T -16 37006874 0 37006874 T A -8 20586272 0 20586272 C T -4 22996590 0 22996590 C A -12 38389348 0 38389348 G A -12 43204289 0 43204289 G A -3 65297848 0 65297848 A T -9 11424871 0 11424871 G C -13 60116536 0 60116536 C T -10 51740083 0 51740083 A G -15 124852912 0 124852912 T A -13 19536436 0 19536436 A G -5 78988669 0 78988669 C T -13 206155281 0 206155281 T A -4 46804233 0 46804233 A G -13 123518728 0 123518728 G A -11 25019003 0 25019003 C T -3 90109806 0 90109806 T C -14 66801134 0 66801134 T C -1 264093653 0 264093653 A G -8 116953194 0 116953194 C A -8 114327823 0 114327823 T A -14 1776385 0 1776385 C T -7 18589522 0 18589522 G A -9 14153655 0 14153655 G A -9 24602615 0 24602615 C T -20 2977681 0 2977681 C G -6 126866578 0 126866578 G A -6 138510692 0 138510692 C T -6 94183851 0 94183851 A G -14 93734942 0 93734942 G A -10 2501691 0 2501691 A C -11 69509647 0 69509647 T C -9 20006638 0 20006638 A G -18 52297761 0 52297761 A G -1 296542833 0 296542833 T C -13 207916240 0 207916240 T C -15 85157450 0 85157450 T G -6 87995661 0 87995661 A G -3 103199342 0 103199342 C A -7 9898327 0 9898327 C T -10 4379166 0 4379166 G A -1 191152627 0 191152627 T A -13 82601076 0 82601076 G A -3 48603018 0 48603018 A C -5 53476051 0 53476051 C T -10 12048513 0 12048513 G A -3 126479873 0 126479873 T A -14 88702969 0 88702969 A T -3 56098006 0 56098006 G A -9 115466983 0 115466983 A C -6 35550434 0 35550434 C T -15 129809080 0 129809080 T C -18 46397550 0 46397550 G A -15 25845378 0 25845378 T C -12 54997834 0 54997834 A C -1 79885174 0 79885174 G A -3 89304112 0 89304112 C T -8 81904690 0 81904690 T A -5 88310807 0 88310807 G A -7 25438757 0 25438757 G A -3 54169153 0 54169153 A G -14 89050652 0 89050652 A G -8 131004632 0 131004632 G A -6 79840582 0 79840582 A G -10 438023 0 438023 A G -14 132641154 0 132641154 G C -12 765838 0 765838 T C -2 9002177 0 9002177 G C -2 151146099 0 151146099 C G -4 9399336 0 9399336 A G -10 25387311 0 25387311 C A -20 75459481 0 75459481 C T -7 49409641 0 49409641 C T -3 62015622 0 62015622 G T -6 9501209 0 9501209 A G -14 110658814 0 110658814 A G -13 11167361 0 11167361 T C -7 101033398 0 101033398 T C -13 84667905 0 84667905 G A -1 68210464 0 68210464 C T -20 138085909 0 138085909 C A -12 8199397 0 8199397 C T -9 145148650 0 145148650 G C -13 199463650 0 199463650 T C -6 152508094 0 152508094 C T -7 16657061 0 16657061 T C -2 12785001 0 12785001 C T -11 70773948 0 70773948 T C -9 29543457 0 29543457 T C -17 57910454 0 57910454 C G -13 179140858 0 179140858 T C -2 5856903 0 5856903 T C -15 143340888 0 143340888 G T -5 84234825 0 84234825 A G -9 49865011 0 49865011 C G -15 132892034 0 132892034 G A -15 85540125 0 85540125 A G -9 76377375 0 76377375 A G -13 65077997 0 65077997 G A -5 109781196 0 109781196 C G -18 7212815 0 7212815 C T -3 11912170 0 11912170 C T -17 39878152 0 39878152 T C -1 29372377 0 29372377 A G -2 104850116 0 104850116 G T -10 59798257 0 59798257 A G -10 34490257 0 34490257 G C -4 83626224 0 83626224 G A -1 168038827 0 168038827 A C -20 113429050 0 113429050 A C -18 49264946 0 49264946 A G -6 154945082 0 154945082 C T -11 87241192 0 87241192 T C -15 132904303 0 132904303 T A -13 164519788 0 164519788 T A -6 136886571 0 136886571 A G -13 135076659 0 135076659 T C -12 755389 0 755389 T G -5 63347748 0 63347748 G A -1 163832949 0 163832949 T C -1 284358527 0 284358527 A G -8 5718469 0 5718469 A G -10 38253382 0 38253382 T G -4 37173608 0 37173608 G T -8 21870840 0 21870840 A G -4 4408029 0 4408029 A C -1 305254232 0 305254232 T G -7 133971544 0 133971544 A G -1 222451195 0 222451195 G A -7 30410535 0 30410535 G A -16 25708506 0 25708506 A G -7 69388233 0 69388233 C T -4 97947633 0 97947633 T A -1 22560227 0 22560227 C A -13 216508343 0 216508343 T C -2 107200616 0 107200616 C T -9 40845385 0 40845385 C T -12 10194940 0 10194940 G A -13 13884215 0 13884215 T A -15 41913042 0 41913042 T C -17 55831644 0 55831644 C T -2 24138020 0 24138020 A G -3 111810182 0 111810182 T C -8 141705002 0 141705002 C T -14 14954954 0 14954954 T C -5 108782083 0 108782083 T C -20 61636 0 61636 C T -6 35011454 0 35011454 C T -18 2474798 0 2474798 A G -10 39028709 0 39028709 G A -4 4040957 0 4040957 C T -11 77835786 0 77835786 G T -3 61289483 0 61289483 A G -8 147538639 0 147538639 T G -3 29915481 0 29915481 T C -20 7626752 0 7626752 C T -11 1870147 0 1870147 A C -14 80529823 0 80529823 T C -15 59687279 0 59687279 A C -9 16179892 0 16179892 C T -16 12203154 0 12203154 A G -2 133968392 0 133968392 G A -14 93905142 0 93905142 G T -9 7107417 0 7107417 T A -15 142095668 0 142095668 G C -15 69270767 0 69270767 T C -8 13106329 0 13106329 T C -17 27678902 0 27678902 A G -11 48189010 0 48189010 A C -12 8698764 0 8698764 A G -9 100031758 0 100031758 A T -5 67274581 0 67274581 T C -17 2896037 0 2896037 C T -1 35983722 0 35983722 C T -11 59627170 0 59627170 A T -7 122259310 0 122259310 C T -6 8962895 0 8962895 A G -8 19828382 0 19828382 G A -20 115046377 0 115046377 T C -17 8864207 0 8864207 T G -17 11519964 0 11519964 G A -2 160399568 0 160399568 A G -10 62947315 0 62947315 C T -18 47465400 0 47465400 G A -8 119943814 0 119943814 T A -12 59154875 0 59154875 T C -16 70354514 0 70354514 A T -4 37100548 0 37100548 C A -4 13334393 0 13334393 T C -2 155896575 0 155896575 A G -12 19306203 0 19306203 A G -4 72253578 0 72253578 A T -1 295379234 0 295379234 T G -15 121994385 0 121994385 T C -15 152970723 0 152970723 T C -20 122083940 0 122083940 T C -15 112586770 0 112586770 C A -17 8644273 0 8644273 A G -1 262721418 0 262721418 G T -6 9926918 0 9926918 C T -7 119382615 0 119382615 A G -4 72007378 0 72007378 T C -1 251278250 0 251278250 T G -4 100947771 0 100947771 A G -1 109786660 0 109786660 C T -14 39907727 0 39907727 A G -1 234535044 0 234535044 G A -4 139091404 0 139091404 T C -1 43870305 0 43870305 T G -2 5335312 0 5335312 T C -13 111176199 0 111176199 A G -6 64440929 0 64440929 G A -3 56605114 0 56605114 T C -3 59174211 0 59174211 A G -7 40490700 0 40490700 A G -8 134359049 0 134359049 T C -1 289920890 0 289920890 G A -7 10578444 0 10578444 G A -1 184731558 0 184731558 T C -17 20698729 0 20698729 G A -16 56210123 0 56210123 A G -1 10935558 0 10935558 C A -4 20294212 0 20294212 A G -1 25027786 0 25027786 G A -4 46976720 0 46976720 A T -11 56760635 0 56760635 A C -3 4310618 0 4310618 C T -16 32062486 0 32062486 T A -13 89774453 0 89774453 T C -2 87189964 0 87189964 A G -8 144659200 0 144659200 A G -11 23976971 0 23976971 C A -9 27035591 0 27035591 C A -4 12505720 0 12505720 C A -8 31527848 0 31527848 A G -4 94980678 0 94980678 A G -13 12475275 0 12475275 T C -9 131098938 0 131098938 G A -15 50748951 0 50748951 A G -13 194720562 0 194720562 T C -16 23764088 0 23764088 G T -1 267859647 0 267859647 A G -9 9583707 0 9583707 T C -18 3619778 0 3619778 G A -10 33987747 0 33987747 T G -9 21330066 0 21330066 G A -13 214088805 0 214088805 G T -8 132854473 0 132854473 A G -1 205834776 0 205834776 G A -8 20199798 0 20199798 A G -13 55394213 0 55394213 T C -9 25621314 0 25621314 T G -2 18705197 0 18705197 A C -18 48604159 0 48604159 C T -9 119149859 0 119149859 G A -13 110512721 0 110512721 T C -2 25646706 0 25646706 A G -2 158325994 0 158325994 A G -4 31708984 0 31708984 A G -16 74559656 0 74559656 C T -10 1972095 0 1972095 C T -13 4216574 0 4216574 C T -5 97972678 0 97972678 C T -10 6097616 0 6097616 T C -4 12542583 0 12542583 A G -18 49612395 0 49612395 A G -20 37612406 0 37612406 C T -12 60308182 0 60308182 T C -1 289990830 0 289990830 G A -10 76407849 0 76407849 A G -17 67457042 0 67457042 C A -3 28940664 0 28940664 G A -2 37866407 0 37866407 G T -14 12572263 0 12572263 A G -13 197098800 0 197098800 A C -15 135149157 0 135149157 T C -11 40847999 0 40847999 C T -4 142680712 0 142680712 T C -1 61561947 0 61561947 C A -3 119078493 0 119078493 T C -10 19096696 0 19096696 T C -5 7502009 0 7502009 T C -8 125824758 0 125824758 T C -7 89281305 0 89281305 C T -20 36403542 0 36403542 G A -4 68277706 0 68277706 G A -7 53233246 0 53233246 G T -11 20699902 0 20699902 G A -15 155280428 0 155280428 G C -8 145499098 0 145499098 G A -7 48150954 0 48150954 C T -2 68001320 0 68001320 T G -13 192391778 0 192391778 G T -4 98566489 0 98566489 A G -11 12602061 0 12602061 A G -7 94706606 0 94706606 G A -8 128094645 0 128094645 G A -7 95388079 0 95388079 A C -15 143898004 0 143898004 T A -17 28485860 0 28485860 G A -9 32208289 0 32208289 C T -16 59623791 0 59623791 A G -17 1386250 0 1386250 C T -9 31819109 0 31819109 A G -4 115606296 0 115606296 C T -17 33477613 0 33477613 C A -1 9577887 0 9577887 A G -9 71366737 0 71366737 G A -10 72583725 0 72583725 A G -9 21734364 0 21734364 G A -13 133538226 0 133538226 A G -15 62835015 0 62835015 A T -9 56963225 0 56963225 A G -14 3605398 0 3605398 C A -2 29129025 0 29129025 A G -3 29290354 0 29290354 A G -10 69964714 0 69964714 T A -13 59802535 0 59802535 C A -14 140566412 0 140566412 T C -3 83761271 0 83761271 T C -6 65419917 0 65419917 T C -12 30860485 0 30860485 C A -13 190995021 0 190995021 G A -1 3713814 0 3713814 C T -14 63943210 0 63943210 A G -6 79892547 0 79892547 T A -5 102275741 0 102275741 C T -16 72982573 0 72982573 A G -8 136425027 0 136425027 G A -9 135633057 0 135633057 T A -6 22226722 0 22226722 A G -6 141504534 0 141504534 C T -1 3328434 0 3328434 C T -10 20666231 0 20666231 G C -11 81139936 0 81139936 A G -6 32475253 0 32475253 A G -6 68875001 0 68875001 C T -1 226615045 0 226615045 G A -16 3260851 0 3260851 A C -6 122838447 0 122838447 G A -12 26270953 0 26270953 A G -8 70381843 0 70381843 G T -17 5546235 0 5546235 T C -2 27887012 0 27887012 G C -4 69416043 0 69416043 C T -20 9623582 0 9623582 A G -9 4247365 0 4247365 A T -8 75092906 0 75092906 T A -18 328015 0 328015 G C -1 145654133 0 145654133 G A -9 129070390 0 129070390 G T -1 47947526 0 47947526 T G -4 84121842 0 84121842 A G -9 64069844 0 64069844 G A -15 133072415 0 133072415 G A -12 20352390 0 20352390 T G -1 123477412 0 123477412 T C -8 79947641 0 79947641 G A -10 48402789 0 48402789 G A -6 153485358 0 153485358 C T -18 56808601 0 56808601 G A -2 119408126 0 119408126 T G -3 63024840 0 63024840 C A -3 111077373 0 111077373 G T -4 34136595 0 34136595 T C -14 41144426 0 41144426 A C -2 42941048 0 42941048 C T -8 10815795 0 10815795 A C -5 106781912 0 106781912 T G -5 104467351 0 104467351 A G -7 92534846 0 92534846 G C -11 28721835 0 28721835 A T -5 82941120 0 82941120 A C -3 11821934 0 11821934 A G -2 119701824 0 119701824 A G -16 38039217 0 38039217 C G -16 3861109 0 3861109 A C -9 5660246 0 5660246 A C -16 14874842 0 14874842 A C -7 54825625 0 54825625 C T -2 46351047 0 46351047 G A -4 4331405 0 4331405 T C -8 30857065 0 30857065 A G -2 48634441 0 48634441 T C -20 2980082 0 2980082 G C -13 64009376 0 64009376 A G -18 57052515 0 57052515 G C -8 5206829 0 5206829 C T -16 6764413 0 6764413 T A -17 39260455 0 39260455 A C -2 27318032 0 27318032 C T -16 35780573 0 35780573 G A -13 142389605 0 142389605 T C -17 7076246 0 7076246 T C -13 7702018 0 7702018 T C -1 247856816 0 247856816 A C -14 133469829 0 133469829 C T -1 146005980 0 146005980 T C -13 123484831 0 123484831 T G -1 139525376 0 139525376 C G -5 80754612 0 80754612 A G -15 58934555 0 58934555 T C -1 201797534 0 201797534 G A -3 17399576 0 17399576 T A -13 161239570 0 161239570 G A -5 72149849 0 72149849 C T -11 11317401 0 11317401 G A -16 80130367 0 80130367 T C -5 41992316 0 41992316 C T -5 9400253 0 9400253 G A -1 139379600 0 139379600 T G -13 211316435 0 211316435 C T -2 121947502 0 121947502 T G -16 80627749 0 80627749 T C -17 23212776 0 23212776 A G -9 115743617 0 115743617 A G -8 20586576 0 20586576 A G -13 40919213 0 40919213 G A -11 52361317 0 52361317 C T -6 13635506 0 13635506 G A -2 68130193 0 68130193 T G -4 5024315 0 5024315 T G -18 57376575 0 57376575 C T -13 172503341 0 172503341 C A -7 66464431 0 66464431 A C -5 8398549 0 8398549 A G -13 4151633 0 4151633 T A -13 133496141 0 133496141 A G -3 55560681 0 55560681 G A -4 9370839 0 9370839 G A -7 89525774 0 89525774 C T -1 17352694 0 17352694 T G -12 16138284 0 16138284 A T -13 31225116 0 31225116 G A -13 107376527 0 107376527 T A -9 31075003 0 31075003 T C -13 206421351 0 206421351 C T -9 2080093 0 2080093 C A -16 23628687 0 23628687 T C -14 104797078 0 104797078 A C -16 13437948 0 13437948 C T -8 78479878 0 78479878 A G -15 21563522 0 21563522 A G -4 1121963 0 1121963 G A -18 52297851 0 52297851 C T -16 32674384 0 32674384 A G -3 89818956 0 89818956 T C -17 14524181 0 14524181 G T -6 144791066 0 144791066 T C -12 39630776 0 39630776 A G -4 45127184 0 45127184 C A -11 57676169 0 57676169 G A -1 193506857 0 193506857 C G -16 21231546 0 21231546 T G -17 1922227 0 1922227 T C -7 44888384 0 44888384 A G -5 100780379 0 100780379 T G -3 115746409 0 115746409 A G -12 59396013 0 59396013 A G -1 214927943 0 214927943 A G -20 44642723 0 44642723 T C -1 43086155 0 43086155 T C -15 64016279 0 64016279 C A -18 58256571 0 58256571 G A -2 154855977 0 154855977 C G -8 11388975 0 11388975 A G -3 115786577 0 115786577 A G -12 61426026 0 61426026 T C -9 149503484 0 149503484 T C -20 31208602 0 31208602 A G -1 162288961 0 162288961 G A -8 145403298 0 145403298 A G -8 73163283 0 73163283 A G -13 61201103 0 61201103 G A -16 70961100 0 70961100 G T -2 14686709 0 14686709 T C -5 95593 0 95593 G A -9 29510201 0 29510201 G A -1 13698880 0 13698880 T A -11 78454812 0 78454812 A G -15 157297471 0 157297471 A G -11 40071063 0 40071063 A G -10 30626518 0 30626518 A C -9 94129855 0 94129855 A C -4 102470204 0 102470204 T C -10 7542540 0 7542540 G T -8 124634281 0 124634281 T A -8 132114147 0 132114147 C T -9 138865622 0 138865622 A G -3 119924541 0 119924541 G C -1 22433910 0 22433910 A G -2 50376704 0 50376704 G A -18 17422524 0 17422524 G A -10 57030705 0 57030705 A C -11 85904444 0 85904444 T C -14 78797071 0 78797071 T C -8 106670637 0 106670637 A G -2 9380107 0 9380107 G A -1 114547642 0 114547642 A C -2 41014452 0 41014452 T A -20 4132429 0 4132429 G A -4 21077227 0 21077227 C T -20 135847002 0 135847002 C T -13 69599415 0 69599415 A C -3 93018557 0 93018557 A G -1 266828280 0 266828280 A G -12 9561031 0 9561031 C T -7 56955229 0 56955229 G A -4 64859989 0 64859989 G C -13 182833205 0 182833205 G C -13 74408680 0 74408680 T C -11 8766717 0 8766717 G C -6 66780505 0 66780505 T C -13 3810679 0 3810679 G A -18 53514661 0 53514661 A G -1 25497269 0 25497269 A G -6 846208 0 846208 T G -17 59452876 0 59452876 C A -8 142867014 0 142867014 C T -8 125320154 0 125320154 A G -14 12858674 0 12858674 T C -15 155288232 0 155288232 A G -13 63188255 0 63188255 C T -1 130333270 0 130333270 C T -4 3769928 0 3769928 C A -2 62303225 0 62303225 A T -13 208391415 0 208391415 G T -7 54985999 0 54985999 T C -7 120324981 0 120324981 A G -13 88884902 0 88884902 A G -16 23922557 0 23922557 C T -8 8985630 0 8985630 A G -2 10611738 0 10611738 C T -13 7826573 0 7826573 T G -4 11994534 0 11994534 G A -14 239624 0 239624 T C -2 153441278 0 153441278 A G -1 229493186 0 229493186 T C -11 84659633 0 84659633 G A -16 73727634 0 73727634 T C -6 16367526 0 16367526 C T -6 157381028 0 157381028 C T -13 35749685 0 35749685 T A -16 12847914 0 12847914 T C -15 149295230 0 149295230 T C -2 156101081 0 156101081 C T -11 85695584 0 85695584 C A -3 5313099 0 5313099 C T -5 13022948 0 13022948 G A -1 208112457 0 208112457 A T -14 7002358 0 7002358 A G -10 55792720 0 55792720 G A -9 14375113 0 14375113 A G -9 19199878 0 19199878 T C -14 62334981 0 62334981 T C -5 100718794 0 100718794 A C -13 133866391 0 133866391 G A -9 39369799 0 39369799 T C -15 147582827 0 147582827 C T -10 52098643 0 52098643 G C -1 180989283 0 180989283 C A -6 141919244 0 141919244 G C -9 13943595 0 13943595 A T -7 97251587 0 97251587 G A -7 33240705 0 33240705 A G -9 82867767 0 82867767 G T -15 99634319 0 99634319 T A -4 92848076 0 92848076 T C -13 178639303 0 178639303 G A -18 26021439 0 26021439 C T -13 83219269 0 83219269 T G -7 4518443 0 4518443 G T -2 155301956 0 155301956 C A -4 123919651 0 123919651 A T -11 33007562 0 33007562 G A -5 34728064 0 34728064 A G -8 131180019 0 131180019 C T -6 114402495 0 114402495 G C -1 292047204 0 292047204 A C -4 11198398 0 11198398 G A -11 21091670 0 21091670 G A -14 24595086 0 24595086 G A -5 20727661 0 20727661 T C -14 37757989 0 37757989 G T -4 15382683 0 15382683 C T -18 28583280 0 28583280 A G -18 12744312 0 12744312 C G -2 2670244 0 2670244 C A -8 14640261 0 14640261 C A -2 154072092 0 154072092 C T -2 87036192 0 87036192 A G -10 3544703 0 3544703 A C -16 63723574 0 63723574 T C -14 36920870 0 36920870 C G -3 12068429 0 12068429 T C -1 195828562 0 195828562 C A -3 134245804 0 134245804 C T -16 253647 0 253647 G T -8 62833371 0 62833371 C T -4 79261862 0 79261862 G A -1 170850809 0 170850809 T A -2 122147442 0 122147442 T C -18 51083392 0 51083392 A G -5 34218010 0 34218010 G A -9 152700072 0 152700072 C T -11 11523705 0 11523705 C T -2 27827033 0 27827033 C T -3 11331052 0 11331052 A G -16 15587105 0 15587105 G A -13 143561736 0 143561736 C A -8 17725335 0 17725335 T A -15 33148500 0 33148500 G A -10 24686087 0 24686087 T C -4 119808889 0 119808889 C G -8 60649748 0 60649748 T C -11 3264869 0 3264869 T A -8 80415387 0 80415387 G A -13 200917679 0 200917679 A G -11 6526204 0 6526204 A C -6 68584520 0 68584520 G A -1 46285086 0 46285086 A C -14 149281824 0 149281824 T C -5 76611429 0 76611429 T A -7 32580775 0 32580775 T G -1 50550499 0 50550499 T C -1 36448786 0 36448786 A G -10 21641994 0 21641994 G A -7 26164917 0 26164917 T C -2 81005633 0 81005633 G A -17 18938419 0 18938419 C T -6 72222291 0 72222291 T C -13 696420 0 696420 T C -11 67664741 0 67664741 T G -4 2249426 0 2249426 C T -1 33316884 0 33316884 C G -6 122196440 0 122196440 A G -10 51019474 0 51019474 G A -9 3394220 0 3394220 A T -2 23761830 0 23761830 G C -6 111679438 0 111679438 C T -3 125447304 0 125447304 A C -6 132394753 0 132394753 C A -14 145522935 0 145522935 G C -15 117588380 0 117588380 A G -18 41290643 0 41290643 C T -13 29776483 0 29776483 A G -9 129456803 0 129456803 T C -14 87812102 0 87812102 A G -13 83247282 0 83247282 C G -1 289912903 0 289912903 A G diff --git a/test/data/issue26/mydata.fam b/test/data/issue26/mydata.fam deleted file mode 100644 index 5955031..0000000 --- a/test/data/issue26/mydata.fam +++ /dev/null @@ -1,120 +0,0 @@ -aa aa 0 0 0 1 2 1 -ab ab 0 0 0 2 2 1 -ac ac 0 0 0 1 1 1 -ad ad 0 0 0 1 2 1 -ae ae 0 0 0 1 1 1 -af af 0 0 0 1 1 2 -ag ag 0 0 0 2 1 2 -ah ah 0 0 0 2 2 1 -ai ai 0 0 0 1 1 1 -aj aj 0 0 0 2 1 1 -ak ak 0 0 0 1 1 1 -al al 0 0 0 2 1 1 -am am 0 0 0 1 1 1 -an an 0 0 0 2 1 1 -ao ao 0 0 0 1 1 1 -ap ap 0 0 0 2 1 1 -aq aq 0 0 0 1 1 1 -ar ar 0 0 0 2 1 1 -as as 0 0 0 2 1 1 -at at 0 0 0 1 1 2 -au au 0 0 0 2 1 2 -av av 0 0 0 1 1 2 -aw aw 0 0 0 2 1 2 -ax ax 0 0 0 2 1 2 -ay ay 0 0 0 1 3 1 -az az 0 0 0 1 3 1 -ba ba 0 0 0 2 3 1 -bb bb 0 0 0 2 3 2 -bc bc 0 0 0 2 1 1 -bd bd 0 0 0 1 1 1 -be be 0 0 0 1 1 1 -bf bf 0 0 0 2 1 1 -bg bg 0 0 0 2 1 2 -bh bh 0 0 0 1 1 2 -bi bi 0 0 0 2 1 2 -bj bj 0 0 0 2 1 2 -bk bk 0 0 0 2 1 1 -bl bl 0 0 0 1 1 1 -bm bm 0 0 0 2 1 1 -bn bn 0 0 0 2 1 1 -bo bo 0 0 0 1 3 2 -bp bp 0 0 0 2 3 2 -bq bq 0 0 0 1 3 2 -br br 0 0 0 2 3 2 -bs bs 0 0 0 1 3 2 -bt bt 0 0 0 2 3 2 -bu bu 0 0 0 1 2 1 -bv bv 0 0 0 2 2 1 -bw bw 0 0 0 2 2 1 -bx bx 0 0 0 1 1 1 -by by 0 0 0 2 1 1 -bz bz 0 0 0 1 1 1 -ca ca 0 0 0 2 1 1 -cb cb 0 0 0 2 1 1 -cc cc 0 0 0 1 2 1 -cd cd 0 0 0 2 2 1 -ce ce 0 0 0 1 3 1 -cf cf 0 0 0 1 3 1 -cg cg 0 0 0 2 3 1 -ch ch 0 0 0 2 3 1 -ci ci 0 0 0 1 3 2 -cj cj 0 0 0 2 3 2 -ck ck 0 0 0 2 2 1 -cl cl 0 0 0 1 1 1 -cm cm 0 0 0 1 1 1 -cn cn 0 0 0 1 1 1 -co co 0 0 0 1 1 1 -cp cp 0 0 0 2 1 1 -cq cq 0 0 0 2 1 1 -cr cr 0 0 0 1 1 1 -cs cs 0 0 0 2 1 1 -ct ct 0 0 0 1 1 2 -cu cu 0 0 0 2 1 2 -cv cv 0 0 0 1 1 1 -cw cw 0 0 0 1 1 1 -cx cx 0 0 0 1 1 1 -cy cy 0 0 0 2 1 1 -cz cz 0 0 0 1 1 1 -da da 0 0 0 2 1 1 -db db 0 0 0 2 1 1 -dc dc 0 0 0 1 1 1 -dd dd 0 0 0 1 3 1 -de de 0 0 0 2 3 1 -df df 0 0 0 1 1 1 -dg dg 0 0 0 2 1 1 -dh dh 0 0 0 2 1 1 -di di 0 0 0 2 2 1 -dj dj 0 0 0 1 1 1 -dk dk 0 0 0 2 1 1 -dl dl 0 0 0 1 1 1 -dm dm 0 0 0 2 1 1 -dn dn 0 0 0 2 1 1 -do do 0 0 0 2 1 1 -dp dp 0 0 0 1 1 1 -dq dq 0 0 0 2 1 1 -dr dr 0 0 0 2 3 2 -ds ds 0 0 0 2 1 1 -dt dt 0 0 0 2 1 1 -du du 0 0 0 2 2 1 -dv dv 0 0 0 1 1 2 -dw dw 0 0 0 1 3 2 -dx dx 0 0 0 2 3 2 -dy dy 0 0 0 2 3 2 -dz dz 0 0 0 1 3 2 -ea ea 0 0 0 1 1 1 -eb eb 0 0 0 2 1 1 -ec ec 0 0 0 1 2 1 -ed ed 0 0 0 1 2 1 -ee ee 0 0 0 1 3 2 -ef ef 0 0 0 2 3 2 -eg eg 0 0 0 1 3 2 -eh eh 0 0 0 1 3 2 -ei ei 0 0 0 2 3 2 -ej ej 0 0 0 1 3 2 -ek ek 0 0 0 2 3 2 -el el 0 0 0 1 2 1 -em em 0 0 0 2 3 2 -en en 0 0 0 1 3 2 -eo eo 0 0 0 1 3 2 -ep ep 0 0 0 1 3 2 diff --git a/test/data/issue26/mydata_kinship.sXX.txt b/test/data/issue26/mydata_kinship.sXX.txt deleted file mode 100644 index ab3a804..0000000 --- a/test/data/issue26/mydata_kinship.sXX.txt +++ /dev/null @@ -1,120 +0,0 @@ -1.085708558 0.6282058567 -0.1155103184 0.4885616687 -0.1250815308 -0.08913013391 -0.08699896879 0.2073885662 -0.1160941814 -0.1064160152 -0.1430712511 -0.1234491538 -0.1278547165 0.2352527262 -0.125297472 -0.1462340437 -0.1281621449 -0.1231504018 -0.1381868253 -0.002998084607 -0.01262132299 -0.01096679168 -0.01385622703 -0.001741889765 -0.02935160031 -0.0237710064 -0.02186454375 0.02025969204 -0.1200158552 -0.1220850259 -0.1289179349 -0.1325913137 -0.102435554 -0.1199200656 -0.1205093134 -0.1129501885 -0.1168104616 -0.1234186601 -0.1440226645 -0.1260998058 0.0120543117 -0.02816184837 0.00636448257 -0.01567310602 0.002954200517 0.007852506708 0.2629541268 0.2535020191 0.2619635718 -0.1127500184 -0.1183937299 -0.1342968865 -0.1281712458 -0.111783251 0.2634320558 0.2671426778 0.09407850676 0.01056475177 0.007841136654 -0.0008840727083 0.0221813105 0.008400687168 0.2270453059 -0.1078639826 0.2975599214 -0.1322021097 -0.124830559 -0.1280788925 -0.1316203936 -0.1155268035 -0.1361353205 -0.09255579254 -0.1111700147 -0.1436838845 -0.1524987076 -0.1256602228 -0.1251106187 -0.1467809871 0.05630648479 -0.1395524599 -0.1144104733 0.06093594629 0.06079334116 -0.1239610135 -0.1263040208 -0.1092772265 0.267513591 -0.1268980977 -0.1411780367 -0.117103985 -0.1212583052 -0.1286071031 -0.1233581566 -0.1252568753 -0.1264900283 0.01920079426 0.005528366461 0.07790150652 0.2497735615 0.04618894983 0.01454063186 0.0631349183 0.009792150877 0.04456947734 0.07154842604 -0.01477844438 0.2166792165 -0.1357661537 0.003533807955 -0.01046614667 0.01690316736 -0.03356706382 -0.01748459932 0.5340640585 0.3539872986 0.2522760745 0.09673255451 0.04891384322 -0.01831894126 0.3173682377 -0.6282058567 1.202719781 -0.1195940989 0.5078693693 -0.1073059126 -0.08849189787 -0.09159098129 0.1880058826 -0.1048322725 -0.09836593272 -0.1422729041 -0.1245217841 -0.1283644511 0.259801357 -0.1116237399 -0.15437301 -0.1356341293 -0.1225659768 -0.1370798654 -0.007048458362 -0.003521650205 -0.01639013803 -0.02960376309 -0.02940049324 -0.03035974883 -0.01171350778 -0.01332908607 0.01843043741 -0.1510381349 -0.1317365107 -0.1348898172 -0.1701683397 -0.1020530676 -0.1449181238 -0.1412587823 -0.1173042157 -0.1355677181 -0.1133153341 -0.1370830394 -0.1222523513 0.01793422663 -0.02222542289 0.009760790307 -0.006791943672 0.02930981348 0.0260307418 0.2702302167 0.2599955272 0.2658134502 -0.1142687284 -0.1168334994 -0.1260053459 -0.1304877194 -0.1133577104 0.272426602 0.2202853367 0.09758654944 0.01354699067 0.0242788636 -0.001992617886 0.03261840818 0.001978406233 0.181017163 -0.1149271286 0.2649256751 -0.134976116 -0.1086374944 -0.1232901871 -0.1209192796 -0.1195722517 -0.1300673313 -0.105119046 -0.1142758818 -0.1385849189 -0.1519026844 -0.1281327805 -0.1216497857 -0.1408957327 0.06333543251 -0.1380613844 -0.1148598787 0.05553967664 0.04183441494 -0.135423117 -0.1388055064 -0.09711176129 0.2351939192 -0.1223398249 -0.1408607675 -0.12482723 -0.1288860319 -0.1393338945 -0.1150247928 -0.1353085239 -0.1388257425 0.03652102015 -0.002215936011 0.04609431961 0.2231160177 0.0411151026 0.01457493454 0.1212502806 0.01724702564 0.04783858101 0.06123750702 -0.005957885087 0.2192198585 -0.143524853 0.009750527927 -0.01001439041 0.0129172967 -0.03641036342 -0.01941751081 0.5224299142 0.3966085786 0.2595645921 0.08097242721 0.0435771114 -0.02848161737 0.367463872 --0.1155103184 -0.1195940989 0.8799145928 -0.1232439709 0.09145760732 -0.03344145274 -0.04608845189 -0.1293790309 0.04990988372 -0.03190041753 0.1071909605 0.0654103516 0.06027902552 -0.1204082127 0.09022966946 0.06311570827 0.09389994832 0.09863576444 0.1107218762 -0.09470170489 -0.0755653858 0.03902356053 -0.08827718775 -0.08865344347 -0.04839113184 -0.0408248099 -0.0433819855 -0.08328915865 0.09575526927 0.06211194602 0.07934168359 0.06763491363 -0.03572355726 -0.05222251906 -0.05535053272 -0.0473754496 0.1556765785 0.1003408598 0.1213188274 0.09663424049 -0.08661852279 -0.08438618072 -0.08142299769 -0.09016301412 -0.09812248482 -0.09958069773 -0.1520630887 -0.1398320472 -0.1399275993 0.06463198095 0.07637231184 0.0632923034 0.06861627283 0.07262697368 -0.1159039171 -0.1480072136 -0.1355082349 -0.10061211 -0.102544189 -0.10649342 -0.09625377864 -0.07490974172 -0.1352652884 0.08666643808 -0.1150910238 0.08725223432 0.08762949914 0.1202169274 0.1333579826 0.232262036 0.2627293251 -0.04690082264 -0.05043391825 0.07003983094 0.07962473906 0.07556188174 0.06061192353 0.07896286535 -0.03692484064 0.04239982644 0.131710628 -0.02666340193 -0.0304015018 0.1502951418 0.1197742592 0.1259256107 -0.122388009 0.06143038669 0.05671312669 0.2146869561 0.2082166145 0.1945856063 0.2353912559 0.1481856949 0.06074065633 -0.07543300375 -0.08529122244 -0.09790690775 -0.1499705495 -0.08853466216 -0.07864237218 -0.08250941679 -0.08477054142 -0.06902253693 -0.05379655073 -0.05043874768 -0.1413818906 0.2167293859 -0.0888582548 -0.085109167 -0.09869520766 -0.08813135235 -0.09699274658 -0.1322606412 -0.145971227 -0.1295251066 -0.08361356848 -0.08841144777 -0.1002533622 -0.1305825944 -0.4885616687 0.5078693693 -0.1232439709 1.122261373 -0.1177244128 -0.1212697539 -0.1050284559 0.2057845008 -0.1149228405 -0.1068840475 -0.127609496 -0.1255726636 -0.1192411017 0.2209308182 -0.1122246863 -0.150731555 -0.136965383 -0.137795487 -0.1467203931 -0.0306264983 -0.006844457183 -0.01370057772 -0.01775414789 -0.02133567648 -0.04545372067 -0.04466335965 -0.03206536432 -0.01066516846 -0.1156696251 -0.1316686377 -0.1317635014 -0.1518176807 -0.1077343937 -0.1299338706 -0.1302975665 -0.1220803263 -0.1217942458 -0.1139856195 -0.1202199062 -0.1250689465 -0.009174358804 -0.03577650118 -0.02317630894 -0.03202088223 -0.01097521378 -0.02838807359 0.2407238211 0.2249939719 0.2273978629 -0.1316066099 -0.1269593014 -0.1139431314 -0.1113998089 -0.08464892782 0.3353205977 0.33932184 0.08757227447 -0.02720645435 -0.00738757141 -0.02186715041 -0.01215626939 0.01512870806 0.3259492558 -0.1018512237 0.3314012761 -0.1178758673 -0.1347795282 -0.1316002637 -0.1162365538 -0.113137837 -0.1162367555 -0.1202207366 -0.1202744348 -0.1613585736 -0.146328546 -0.1337209213 -0.1331172297 -0.1348383669 0.04943912194 -0.1276458889 -0.1295464663 0.04929220285 0.05101831965 -0.1280830534 -0.1315693396 -0.115961023 0.4582017533 -0.1321409636 -0.1395580243 -0.1167352908 -0.1272603502 -0.1351881561 -0.1213038152 -0.13942345 -0.1317841203 -0.003232950385 -0.01625641399 0.1284182236 0.2897590193 0.04453702736 -0.001846997739 0.1151228464 -0.01045984245 0.009658279166 0.0585768709 -0.01692659487 0.1922219691 -0.1375218788 -0.02801743733 -0.03072625006 0.001607214923 -0.04099598484 -0.02587009079 0.5650192674 0.4346932831 0.3611980089 0.1005780934 0.04862101518 -0.01752815359 0.4037436224 --0.1250815308 -0.1073059126 0.09145760732 -0.1177244128 0.916711478 -0.02629589362 -0.04325876838 -0.1225899989 0.06790321805 -0.01942507704 0.242775549 0.05330508202 0.08980320089 -0.1147975937 0.17525876 0.06623596624 0.05128505786 0.11526706 0.06982667565 -0.08590308798 -0.08907653927 -0.04007091897 -0.08405603215 -0.08202484044 -0.04347078607 -0.05571946054 -0.04871292066 -0.1059663258 0.02828518854 0.04468217917 0.02713775539 0.04095744796 -0.03297469315 -0.03516473145 -0.03210872543 -0.01673416679 0.1394086698 0.2450770521 0.2210722472 0.2481755464 -0.08162196437 -0.08758086469 -0.08967020248 -0.09212971914 -0.09393165541 -0.09724815355 -0.1170954743 -0.1349347246 -0.134282078 0.07886095945 0.05289462082 0.1031621106 0.04693728964 0.08166627912 -0.1340282581 -0.1360664597 -0.1290803812 -0.1026152295 -0.0971648077 -0.08936193057 -0.095804062 -0.08177313469 -0.1332990848 0.06152204514 -0.1344008898 0.1091542146 0.08332777551 0.04869952721 0.04412508304 0.05293203962 0.05507872142 -0.02428266953 -0.01876334389 0.09487473289 0.07259039681 0.04968411732 0.06528297197 0.0264850211 -0.0370330353 0.3026102164 0.09524794545 -0.01607588287 -0.04288195977 0.1307891718 0.1101008913 0.0647071067 -0.1398684332 0.09207529155 0.09814961187 0.1326453189 0.1405972086 0.1487242639 0.1571420001 0.1413409176 0.07971243743 -0.0851278005 -0.1046293334 -0.08933545378 -0.1223658894 -0.08302389772 -0.09347202848 -0.0744417398 -0.09351060896 -0.0674901823 -0.01370114802 -0.009324560498 -0.1222777267 0.09021896311 -0.1069330833 -0.09229721925 -0.1035888851 -0.07442612115 -0.07207506332 -0.1293046309 -0.118392493 -0.1286944338 -0.01208064801 -0.07985896217 -0.08711495647 -0.1130413109 --0.08913013391 -0.08849189787 -0.03344145274 -0.1212697539 -0.02629589362 1.08225891 0.3603712622 -0.07803654929 -0.009272031934 0.1863843063 -0.02566528618 -0.01495885902 -0.01452960765 -0.09524045217 -0.01778295435 -0.02591625678 0.006556681761 -0.006347045164 0.01588442955 0.05442819559 0.05998695932 -0.05730398146 0.04826756741 0.02315827274 -0.07226101176 -0.09537731907 -0.09334439925 0.01009366861 -0.01949367207 -0.01806927882 -0.02399413154 -0.03855926104 0.1952190986 0.1627941257 0.1598365035 0.1608796129 -0.01631051843 -0.03532769231 -0.04389122448 -0.02762103587 0.0147726124 0.06443405368 0.02870299872 0.02780722644 0.0239502401 0.02423119562 -0.0946940218 -0.09252295164 -0.1028070665 -0.0131686846 0.01317139383 -0.03426274443 -0.01807261437 -0.02252543084 -0.1163480122 -0.09989755118 -0.09608653649 0.08852581859 0.04824709336 0.07051182819 0.01710907779 0.0005738205534 -0.1110724794 0.003287569087 -0.09145933722 -0.008928387897 -0.0009280105533 -0.0055915674 -0.005640780146 -0.02572619169 -0.0348773763 0.1650770794 0.1842559084 -0.03377626786 -0.03981055535 -0.04540361792 -0.02550625734 -0.04706179718 -0.04984083455 -0.02426372206 -0.023005376 -0.04880947245 -0.05885715457 -0.02589273732 -0.004440433683 -0.014051607 -0.1065767762 -0.06377453264 -0.05020927068 -0.04507492412 -0.009063021656 -0.03065401419 -0.02030546838 -0.003081680049 0.01213077201 -0.01118801162 0.01571933508 -0.09986729643 -0.09759492701 0.07308094426 -0.01442133768 -0.04360478711 -0.02850099433 0.04685192246 -0.05902567476 -0.05867047292 -0.1040619647 -0.00306058241 0.07055582224 0.0879078296 0.04536918237 0.07344491774 0.09305294498 -0.1289737386 -0.123641125 -0.08264914807 -0.05647918204 0.07257577068 0.0504618907 -0.09818863321 --0.08699896879 -0.09159098129 -0.04608845189 -0.1050284559 -0.04325876838 0.3603712622 1.108705899 -0.09930257758 -0.0244810118 0.2523368375 -0.04445446619 -0.03504355775 -0.04985259655 -0.06883120931 -0.0375093916 -0.07210308033 -0.009692844778 -0.03111027565 0.002138528856 0.08841395799 0.1052065865 -0.06882215942 0.05818315416 0.04493063721 -0.07116835447 -0.09257706249 -0.08227233168 0.05335687928 -0.01616399144 -0.06379795047 -0.05146340319 -0.06527854054 0.2312745856 0.2161130752 0.2174329725 0.207122875 -0.06322717403 -0.06893086884 -0.07716410565 -0.04431112877 0.06808342225 0.09591898835 0.05022833088 0.07255761975 0.06721289558 0.06275084256 -0.1043063217 -0.1078843972 -0.104714188 -0.0132586161 -0.009490971911 -0.04068472122 -0.04076947099 -0.02593882252 -0.118172058 -0.106898236 -0.08362356589 0.0925289249 0.08229637854 0.1112568206 0.02934466163 0.02085700148 -0.1162160383 -0.004858749156 -0.07832501879 -0.01474768298 -0.01108707424 -0.03651873731 -0.01686244222 -0.04162650193 -0.03438320903 0.1926099844 0.1990179578 -0.06504452718 -0.0711605451 -0.08036824576 -0.0736014879 -0.06867312828 -0.06488076972 -0.01234002987 -0.05242861933 -0.06346649846 -0.07617290294 -0.0490390625 -0.03552559161 0.02121113489 -0.0945885377 -0.06485467768 -0.05593158406 -0.05281292006 -0.05427509482 -0.05312968547 -0.04020446757 -0.03308584484 0.002503652731 -0.00925541698 0.05363824335 -0.0953188154 -0.1037298225 0.06459733883 0.02005475664 -0.0466584402 0.005502007186 0.03207755135 -0.03548853022 -0.05791145756 -0.1006183944 -0.05272356143 0.1047672909 0.06498182218 0.0555447032 0.1006660332 0.04793974619 -0.1237524121 -0.1100081276 -0.09108399611 -0.0599667517 0.06547031224 0.1056698414 -0.06588503477 -0.2073885662 0.1880058826 -0.1293790309 0.2057845008 -0.1225899989 -0.07803654929 -0.09930257758 1.137638847 -0.1060112491 -0.1015582098 -0.1340514095 -0.1170394532 -0.1157045138 0.1649226226 -0.1359651704 -0.1168542969 -0.1274973963 -0.1350109744 -0.1461803871 -0.02166215633 0.0003120167421 -0.00756690685 0.01182917665 -0.003606207006 -0.01996041035 -0.04555344339 -0.03726595331 -0.001074905452 -0.1398893259 -0.1540940965 -0.1399311762 -0.1532224277 -0.1037445537 -0.1085600189 -0.1069780678 -0.09805166755 -0.1254347917 -0.1338315144 -0.1314955759 -0.1327894085 0.005875808667 -0.02240227919 -0.009330241327 -0.01356541509 -0.03674970685 -0.02413111127 0.2226453687 0.2441384819 0.21966216 -0.1290863601 -0.1207333104 -0.1215985334 -0.1030649397 -0.09843314614 0.3938098568 0.4002998176 0.07827921116 0.01031953697 -0.0004017091325 0.01596613815 0.02336266084 0.002029736438 0.3894711258 -0.1086212183 0.2030312527 -0.1350210665 -0.1435267853 -0.1324206398 -0.1347566079 -0.1158766416 -0.123974452 -0.0805273021 -0.08348769716 -0.1196445835 -0.116924585 -0.1039605583 -0.1210758089 -0.1409152197 0.03871844167 -0.1462565189 -0.1241047548 0.04077571769 0.04417156981 -0.1486218288 -0.1576560081 -0.1080562084 0.1966304581 -0.1234574067 -0.1250961763 -0.1296651268 -0.1027703102 -0.1364780927 -0.1470629186 -0.128133654 -0.1067223642 -0.003762833461 0.002446389713 0.05584801107 0.1869498824 0.4453767595 -0.009406227471 0.05399246629 -0.01647727871 0.05633105627 0.0323752688 -0.02314723137 0.3424684891 -0.1285551356 -0.01294366344 -0.01603337726 0.01487712826 -0.04842825216 -0.02668112944 0.1667477083 0.5847066978 0.3877652239 0.07396652986 0.447947375 -0.007466392903 0.3502386921 --0.1160941814 -0.1048322725 0.04990988372 -0.1149228405 0.06790321805 -0.009272031934 -0.0244810118 -0.1060112491 0.9481651957 -0.03179649688 0.07755176311 0.4971248757 0.09295578622 -0.09674335025 0.05990772268 0.05390140623 0.1586986829 0.1691081982 0.1328989812 -0.08996760275 -0.05803292713 -0.04742981315 -0.08570934921 -0.07585217874 -0.004315801994 0.006002637752 -0.02062748837 -0.07026373446 0.01950906733 0.007674835375 0.007745046499 0.05012399826 -0.03568598138 -0.03668085682 -0.03383328934 -0.03027798557 0.002206663541 0.01722472301 0.01630134348 0.02498796184 -0.07903443612 -0.04334574181 -0.08443857724 -0.08411128289 -0.07138884085 -0.07219514559 -0.1267014624 -0.1089958539 -0.1144490856 0.137902919 0.09842587688 0.05133942322 0.06435497502 0.04324172434 -0.1209584659 -0.1085579954 -0.1300613861 -0.07923212977 -0.08186636082 -0.06447314891 -0.06081614438 -0.07451682705 -0.1042531551 0.00337546674 -0.1147913919 0.02294455692 0.03727200013 0.0922562768 0.0420758221 0.1187018953 0.09108978885 -0.01222214688 -0.01705913089 0.1426727117 0.1253494328 0.1030236553 0.1501268557 0.1494504141 0.004918098957 0.03890162089 0.1450491276 -0.03291590274 0.0261568621 0.03302840065 0.0184871718 0.03764849094 -0.118208929 0.2197698774 0.1963716828 0.05769795654 0.03090543946 0.02908002772 0.04516123779 0.03325334532 0.08984769033 -0.07214455658 -0.07483045817 -0.07730229147 -0.1142643464 -0.06774905244 -0.06152181087 0.004343315535 -0.05908152453 -0.05400569771 -0.03806557691 -0.02871938608 -0.1063674299 0.06198392559 -0.104084127 -0.08334035174 -0.07229545053 -0.1011180871 -0.07935275045 -0.1311639821 -0.1337348909 -0.1091145028 -0.05412295009 -0.06697888886 -0.1092106184 -0.1101173414 --0.1064160152 -0.09836593272 -0.03190041753 -0.1068840475 -0.01942507704 0.1863843063 0.2523368375 -0.1015582098 -0.03179649688 1.115951625 -0.01803106305 -0.014210827 0.008863685066 -0.1021083895 -0.02711746766 -0.03162662292 -0.01153830339 -0.01137242523 -0.01034367168 0.06057714447 0.04945735997 -0.0588416381 0.05858759843 0.07787028621 -0.0334825489 -0.06072138051 -0.06073209188 0.002007041038 0.003080386755 -0.04028952485 -0.0406986355 -0.04685624058 0.2832000756 0.2274203098 0.2301752153 0.2924352665 -0.0295222698 -0.02627665846 -0.03510801983 -0.01414072268 0.06121191598 0.1112020994 0.04817068879 0.08040728526 0.06034275104 0.05034362852 -0.1174328735 -0.1175251715 -0.1202720385 -0.02155578952 -0.006393251304 -0.003454271625 -0.000283261202 -0.02930262411 -0.111242089 -0.1183613586 -0.1077992788 0.01791097555 0.05284335645 0.03059882702 0.01960185814 -0.02536123447 -0.1151410159 -0.01248980025 -0.08601309587 -0.001549716987 -0.008298138745 -0.02170828795 -0.01401671875 0.0002614849865 -0.002954442369 0.1870191522 0.198774778 -0.06063257811 -0.04295468877 -0.05733325366 -0.06839138294 -0.0577972447 -0.06324410233 -0.009542301784 -0.02787373264 -0.06594516878 -0.08020830003 -0.02837223495 -0.01032261197 -0.01717023318 -0.1126499856 -0.03643075437 -0.04900115143 -0.03328308933 -0.03147127967 -0.04333001016 -0.03857058129 -0.008822724289 -0.01619855878 -0.007357772332 -0.0103574891 -0.0963056668 -0.1113008755 0.03176201783 -0.0270608167 -0.05504072216 -0.01406022315 -0.003130353789 -0.0454820822 -0.07728696105 -0.1034618239 -0.02866933699 0.04920898724 0.01120227328 -0.002793858297 0.1454657001 0.08101802362 -0.1206396179 -0.1053220604 -0.09693037142 -0.0546108382 0.02809563787 0.1161943359 -0.1001069189 --0.1430712511 -0.1422729041 0.1071909605 -0.127609496 0.242775549 -0.02566528618 -0.04445446619 -0.1340514095 0.07755176311 -0.01803106305 1.012389266 0.0375905711 0.07538895647 -0.1303322606 0.4008039295 0.1172971462 0.08638912296 0.1074833141 0.08605570503 -0.1040389306 -0.1034709394 -0.04334572384 -0.1068044157 -0.1056563183 -0.03887798529 -0.03672187942 -0.04076951329 -0.1205856064 0.07846249737 0.0654648538 0.07052865251 0.1142218789 -0.04361024521 -0.02960866489 -0.02750298882 0.003903438057 0.08873189862 0.257263615 0.2754236509 0.2917461023 -0.07642771577 -0.09440882967 -0.1026384676 -0.09051554889 -0.1042178619 -0.09461253685 -0.1313587895 -0.1428717546 -0.1453382689 0.05842698653 0.05664259992 0.1201831548 0.06759416265 0.0926577183 -0.1348317998 -0.1449491737 -0.1462549456 -0.111560989 -0.1170311043 -0.1005766045 -0.09337361743 -0.08960526981 -0.1436695716 0.06690798641 -0.1411195248 0.07535937297 0.06910676162 0.04760084065 0.05727163743 0.07373805126 0.08817625714 -0.004330716152 0.01540793976 0.1209204494 0.1358617322 0.0889674178 0.0972110319 0.08946553045 -0.05425656877 0.1635826636 0.1019124638 -0.03109741977 -0.05927227918 0.1302717261 0.09416276641 0.06898332643 -0.1489892969 0.1375332379 0.1188447239 0.1094375728 0.0635233475 0.09458872088 0.1119374827 0.06560231195 0.1050108758 -0.1059919806 -0.102029541 -0.1093714065 -0.1487471059 -0.08022026432 -0.08550248199 -0.08089149222 -0.1061643317 -0.09624583315 -0.02315148424 -0.0109961865 -0.1388157732 0.1035647776 -0.1066425556 -0.1072103108 -0.1116895395 -0.124654739 -0.1078088586 -0.1366758343 -0.1340962665 -0.1347881442 -0.03314760033 -0.08019135366 -0.1155122783 -0.1367831353 --0.1234491538 -0.1245217841 0.0654103516 -0.1255726636 0.05330508202 -0.01495885902 -0.03504355775 -0.1170394532 0.4971248757 -0.014210827 0.0375905711 0.9454908969 0.1135459498 -0.1021533861 0.06523601414 0.07047671344 0.1711862113 0.1773381532 0.1479860835 -0.07850433916 -0.07055320851 -0.05459761554 -0.07836669067 -0.07359394984 0.025021988 0.02368693876 -0.01803750872 -0.0551773647 0.04390703892 0.04337918835 0.05057973766 0.07411105032 -0.04035173486 -0.04696803752 -0.04617834081 -0.02602749712 0.02099681039 0.02403373745 0.01735111055 0.04865132134 -0.08407299609 -0.04190819356 -0.08115704273 -0.09221633849 -0.08512673924 -0.08905384255 -0.1289351835 -0.1274684456 -0.1402466187 0.1260642463 0.1047521328 0.06598617602 0.05356444081 0.02323105396 -0.1319109221 -0.1245539629 -0.1276685317 -0.08507815482 -0.08976715721 -0.08288856103 -0.05842341874 -0.06504759116 -0.117086566 0.02551401056 -0.1292275701 0.05766694216 0.04660131418 0.1194932988 0.07778208649 0.09768899748 0.0720619224 -0.02223156435 -0.03420958711 0.1313490688 0.1311597368 0.1141735863 0.1596933305 0.1639386676 -0.007549482976 0.04047344103 0.1157223582 -0.04342036383 0.0007708085106 0.03449024095 0.0325437371 0.06338545823 -0.1322545124 0.1767019552 0.1456623453 0.05928925627 0.02825395272 0.02878496705 0.04699158204 0.03347246548 0.06888813951 -0.06926014195 -0.06368965862 -0.07915519378 -0.1104513396 -0.06075586981 -0.06621100819 -0.01779430244 -0.05589936363 -0.05798156072 -0.02804403211 -0.03911854044 -0.1168225873 0.09858191195 -0.1105365805 -0.08393584321 -0.08245420128 -0.09175111757 -0.07524277997 -0.1362232158 -0.13939425 -0.1140112321 -0.04174366443 -0.06025456523 -0.08632227788 -0.1072808106 --0.1278547165 -0.1283644511 0.06027902552 -0.1192411017 0.08980320089 -0.01452960765 -0.04985259655 -0.1157045138 0.09295578622 0.008863685066 0.07538895647 0.1135459498 0.9314753803 -0.1113569742 0.04967597817 0.05057554955 0.07620046303 0.07568329626 0.08839707068 -0.07003305544 -0.0753179228 -0.0365380138 -0.0771502256 -0.08274358217 -0.03424966555 -0.04301040508 -0.05538984895 -0.09968574757 0.07025506807 0.06119237166 0.05357895012 0.06331457698 -0.02605302349 0.003037731921 0.005587965347 0.006024851642 0.07692322247 0.07981682214 0.08161210016 0.06722034176 -0.08649228403 -0.09303807389 -0.09686472419 -0.09157431287 -0.1021538399 -0.08360281568 -0.1422610667 -0.1441448982 -0.1408506779 -0.0001547382915 0.04622543406 0.09426935603 0.1073773037 0.06372072771 -0.1183646425 -0.1294461978 -0.133770238 -0.07042956983 -0.06518239788 -0.08267982786 -0.1055237143 -0.0898254134 -0.1159255408 0.07498758485 -0.1259775205 0.09477528667 0.06100336225 0.06786001289 0.0444669376 0.2761047103 0.2598693774 0.008765840575 0.004784386068 0.1147703276 0.1167636172 0.1235013544 0.1108331539 0.1206791241 0.03528922109 0.06279015581 0.1592298929 0.0241006354 0.01150495991 0.07523888486 0.07382577051 0.05086283125 -0.1396426944 0.2076173412 0.106817528 0.09316807779 0.09232249771 0.1087191182 0.1074208553 0.07505530434 0.1290766652 -0.09113976866 -0.09780855902 -0.1173955065 -0.1465189807 -0.07685395244 -0.08182556048 -0.05576849422 -0.084041141 -0.09534633705 -0.03356121616 -0.05082953793 -0.1259942861 0.1565707602 -0.08693106599 -0.0743416022 -0.1096647879 -0.07879322441 -0.08490366354 -0.1435348241 -0.1356437999 -0.1217978195 -0.04140634169 -0.07884231046 -0.07785898902 -0.1259943315 -0.2352527262 0.259801357 -0.1204082127 0.2209308182 -0.1147975937 -0.09524045217 -0.06883120931 0.1649226226 -0.09674335025 -0.1021083895 -0.1303322606 -0.1021533861 -0.1113569742 1.124944518 -0.1187286052 -0.1399566618 -0.1287471607 -0.1343351623 -0.1342870625 -0.005537123589 -0.01208194886 -0.02407957527 -0.003318705385 -0.009608487334 -0.02020021678 -0.03015412227 -0.02341974816 -0.001270813254 -0.1344439614 -0.1383233426 -0.1404487725 -0.1509299423 -0.0958830732 -0.1090341435 -0.1084892285 -0.1150903377 -0.134742558 -0.1173833527 -0.1248573356 -0.1305032412 0.0007533385287 -0.01518169489 0.01553332056 -0.00377475073 -0.006163136377 0.002979445597 0.4568430363 0.3979208252 0.4161051238 -0.1053062367 -0.1111167736 -0.1325556909 -0.1114511971 -0.1067702841 0.1989462756 0.2239380913 0.09088856286 -0.01855640288 -0.008085423856 -0.02101731215 0.004848345096 0.01088384001 0.1877836461 -0.1000950641 0.2368707391 -0.1201162859 -0.09476583027 -0.1001205586 -0.112110765 -0.1277236797 -0.1043306262 -0.09846378993 -0.08710373468 -0.1368367541 -0.1550316106 -0.1418467654 -0.1352866262 -0.1471894468 0.2613581302 -0.1167728349 -0.1363332801 0.1629129468 0.2292540801 -0.1367994445 -0.1381953319 -0.08641046391 0.2193624399 -0.1178355605 -0.1278024552 -0.1340238799 -0.1323879275 -0.1241648329 -0.1206869565 -0.1248899205 -0.1350725978 -0.009457699373 -0.002560557352 0.07671299507 0.3559757023 0.0689061046 -0.001044738301 0.03593538782 0.003228793149 0.05675084561 0.1106412813 -0.006460107076 0.35911712 -0.1528642821 -0.0004301704632 -0.01845622351 0.002438718674 -0.02238612604 0.001463833684 0.2251253121 0.205302958 0.2012487431 0.08910699122 0.06773912471 -0.002469321028 0.3936035221 --0.125297472 -0.1116237399 0.09022966946 -0.1122246863 0.17525876 -0.01778295435 -0.0375093916 -0.1359651704 0.05990772268 -0.02711746766 0.4008039295 0.06523601414 0.04967597817 -0.1187286052 0.9314072158 0.09225497983 0.1019441056 0.117479375 0.1074993834 -0.1037938204 -0.08608924454 -0.0386654209 -0.09099963193 -0.1104338587 -0.04652627743 -0.08159079803 -0.04090615025 -0.09740469177 0.07728200383 0.06104142471 0.06502915623 0.09467046336 -0.03804626848 -0.02866477837 -0.02609774068 -0.01391000535 0.1118191733 0.2408077078 0.288875672 0.2579590419 -0.07167592201 -0.09564243232 -0.1045974848 -0.08726980893 -0.09648006172 -0.09170822857 -0.1322463987 -0.1322457119 -0.1321212747 0.1244574824 0.07938065001 0.1352504464 0.09869580606 0.08528104226 -0.1541563316 -0.1519729076 -0.1433982667 -0.1059406725 -0.09918757081 -0.09953046275 -0.0884863954 -0.07334162157 -0.1507987092 0.08595231471 -0.1394116616 0.09271412157 0.1047405978 0.07121977232 0.09874772749 0.06379781733 0.08420792821 -0.02519182329 -0.01594367644 0.06574528013 0.1045830154 0.06422755814 0.08735757098 0.06839745176 -0.06175867554 0.19974322 0.1042826204 -0.05767379835 -0.04117152266 0.1329984151 0.100951961 0.06752117927 -0.1519333124 0.1020333583 0.09070066345 0.0888059368 0.05383896365 0.08682504412 0.09025623768 0.09132102174 0.08517048213 -0.1070770674 -0.08941025822 -0.1049228379 -0.1428434483 -0.0813493493 -0.08506157063 -0.06963813805 -0.1077957657 -0.08204292865 -0.0247088015 -0.01824026041 -0.1297323136 0.09456068782 -0.1011184639 -0.1016176304 -0.110783514 -0.1197063849 -0.1185790291 -0.1291067707 -0.1242627363 -0.1276128635 -0.0297480447 -0.07795307659 -0.1125314981 -0.1038424925 --0.1462340437 -0.15437301 0.06311570827 -0.150731555 0.06623596624 -0.02591625678 -0.07210308033 -0.1168542969 0.05390140623 -0.03162662292 0.1172971462 0.07047671344 0.05057554955 -0.1399566618 0.09225497983 0.9794808482 0.08268617882 0.07465789477 0.09884672017 -0.09058520833 -0.06430475913 -0.03307317382 -0.1075147184 -0.1088431425 0.004210918304 0.00490589737 -0.00263917094 -0.0934625006 0.0572714221 0.2636530725 0.2366937996 0.3070104602 -0.06151167527 -0.04714709123 -0.0501704106 -0.03825701583 0.03329806502 0.0564565387 0.05239088969 0.04704849376 -0.09095413936 -0.08426128669 -0.09598001544 -0.1166811135 -0.09913362042 -0.1132882455 -0.1497132083 -0.1437804436 -0.1394351513 0.07053008143 0.1345143693 0.05868278649 0.08727152934 0.04750939698 -0.1544600303 -0.1446847228 -0.1585921868 -0.09694458247 -0.1061918846 -0.1060081249 -0.0841764592 -0.07305281988 -0.1454093114 0.06360623231 -0.1557369714 0.07562560217 0.1426340788 0.1533542473 0.1336791615 0.04359413828 0.04200546182 -0.02209880392 -0.01818587967 0.2881566089 0.297828352 0.3009088003 0.2947416952 0.2752649015 -0.008481367499 0.07743458653 0.1018031858 -0.05657825841 -0.01761262233 0.07990350436 0.04595924426 0.09419918932 -0.1604294836 0.106732186 0.1364951127 0.03628421193 0.01910471841 0.03876088495 0.05357636874 0.04763486904 0.1025529861 -0.09180139845 -0.08422427936 -0.0747842216 -0.1409148803 -0.06772260114 -0.0787494891 -0.07034365009 -0.088131326 -0.1003031267 -0.05930866406 0.04074196071 -0.1322191724 0.06819072614 -0.09979892603 -0.07061159383 -0.1053345746 -0.119560721 -0.1003839276 -0.1585209389 -0.1633927337 -0.1345027041 -0.0571937306 -0.06795076353 -0.1045323905 -0.1242889067 --0.1281621449 -0.1356341293 0.09389994832 -0.136965383 0.05128505786 0.006556681761 -0.009692844778 -0.1274973963 0.1586986829 -0.01153830339 0.08638912296 0.1711862113 0.07620046303 -0.1287471607 0.1019441056 0.08268617882 0.9446849671 0.471355227 0.4350385299 -0.05618867064 -0.06052026558 -0.05763273832 -0.08292672209 -0.09553992732 -0.05024644506 -0.04505223303 -0.06109894701 -0.07997860632 0.06510184741 0.08383748929 0.07133204466 0.07900779953 -0.02924660407 -0.0296202486 -0.0278828552 -0.01103509328 0.05659248307 0.06587762135 0.0579469947 0.06915816888 -0.06050949826 -0.06004118342 -0.06458928058 -0.07484740226 -0.07815668324 -0.07462008369 -0.1641965849 -0.139739681 -0.1569001738 0.08080969502 0.08605818053 0.07967526742 0.05654697754 0.05019234764 -0.1451613034 -0.1583064639 -0.1455647607 -0.06889300169 -0.08694469263 -0.07640894819 -0.0599792586 -0.07044649789 -0.1289628413 0.04328930166 -0.1377287082 0.04435581378 0.07607458118 0.07595764839 0.04602329535 0.09518728412 0.08607078929 -0.02027260934 -0.003363962442 0.06791115785 0.04905444761 0.0517441437 0.1023004497 0.06292207446 -0.04535368814 0.07869764968 0.1256114294 -0.03983065415 -0.04311302675 0.09740479758 0.09894112601 0.07396883839 -0.1532584057 0.06196536133 0.05065055784 0.1278405478 0.110981635 0.1442930114 0.1546185897 0.1047292319 0.0758286648 -0.06910946218 -0.07693230078 -0.1111294668 -0.1365970285 -0.07799047276 -0.07443231957 -0.0180038885 -0.08832437995 -0.07657432581 -0.05189781666 -0.0575378839 -0.1323331646 0.08060832792 -0.08646936147 -0.05896209618 -0.0884981454 -0.09446799557 -0.07131230492 -0.1377067632 -0.143994875 -0.1401989855 -0.06789531353 -0.07615611104 -0.0899749326 -0.1201973418 --0.1231504018 -0.1225659768 0.09863576444 -0.137795487 0.11526706 -0.006347045164 -0.03111027565 -0.1350109744 0.1691081982 -0.01137242523 0.1074833141 0.1773381532 0.07568329626 -0.1343351623 0.117479375 0.07465789477 0.471355227 0.9873562946 0.4504352683 -0.03876937392 -0.05289318949 -0.07071121954 -0.09181221757 -0.08202503218 -0.03809176494 -0.0488011802 -0.05956426474 -0.07765891337 0.06262016381 0.08216308717 0.05678111581 0.08597619007 -0.04153232875 -0.02142398102 -0.02119252244 0.0007755170457 0.05722008134 0.05504369617 0.02395838345 0.04973898356 -0.07721265979 -0.04585636309 -0.06065753097 -0.06627772601 -0.08091382283 -0.06594695106 -0.1512086793 -0.1504543484 -0.1496983061 0.110533922 0.1016495307 0.09289512508 0.05556953772 0.05218153953 -0.1426079339 -0.1491962092 -0.1322582947 -0.08477883331 -0.0947464764 -0.09424962539 -0.06441992393 -0.08719660744 -0.1374635331 0.03435493129 -0.1235173313 0.06132405702 0.04641212182 0.05445521235 0.02750394343 0.05873639922 0.05304335931 -0.009607520483 -0.01057316358 0.09553719417 0.03730892328 0.04097991924 0.10897835 0.06646361911 -0.04508467416 0.08353866269 0.08546314425 -0.02971760264 -0.0552044177 0.09967318881 0.09643953619 0.06363521404 -0.1504955091 0.09544177044 0.08221957624 0.1210683933 0.08474428275 0.1247282778 0.1699862429 0.1256818908 0.0642077688 -0.07702119428 -0.09353823872 -0.08096762254 -0.1323745496 -0.08428738585 -0.09113787015 -0.02684051071 -0.09936144422 -0.07578362529 -0.03776211561 -0.07187175338 -0.1345805199 0.09634788449 -0.08184371811 -0.06572611873 -0.09654668815 -0.09232933255 -0.08251978795 -0.1400049461 -0.1484114384 -0.1407023045 -0.04932150325 -0.08227941389 -0.09511225213 -0.1243484687 --0.1381868253 -0.1370798654 0.1107218762 -0.1467203931 0.06982667565 0.01588442955 0.002138528856 -0.1461803871 0.1328989812 -0.01034367168 0.08605570503 0.1479860835 0.08839707068 -0.1342870625 0.1074993834 0.09884672017 0.4350385299 0.4504352683 0.9356383627 -0.04018389472 -0.02969221811 -0.06163115136 -0.08797984999 -0.07325143178 -0.04284781819 -0.03194819501 -0.04696208946 -0.08064656501 0.08184524165 0.09309466526 0.09241068439 0.1141749717 -0.01614494663 0.004949396202 0.004292253991 0.01354234123 0.02620373617 0.03602693292 0.03250240556 0.04684596077 -0.08066132709 -0.07337715799 -0.07343197571 -0.08319305213 -0.08050687855 -0.07192786527 -0.1527809337 -0.1463107838 -0.142475426 0.1082690412 0.09665881734 0.08040862585 0.06506353672 0.04850659353 -0.1442411931 -0.1621045194 -0.141255087 -0.07168229073 -0.08989058469 -0.07014049073 -0.07603471545 -0.07031168255 -0.1450115451 0.03241912617 -0.1470358268 0.04808060334 0.07143704924 0.04557516538 0.04427086869 0.06595256564 0.1054425243 -0.01263937491 -0.003739452596 0.09750353968 0.09214766193 0.08714642999 0.07504698879 0.1121772059 -0.03578155425 0.09400813687 0.08937612435 -0.03580386213 -0.04348612293 0.08068178994 0.08920821178 0.04553536491 -0.148303749 0.1021543101 0.0628750146 0.06786582455 0.07119194656 0.1220647065 0.1166204796 0.09063092359 0.09884466655 -0.07752551591 -0.0921035639 -0.1054802156 -0.1304679796 -0.07125114965 -0.08687477204 -0.01372792827 -0.1060140065 -0.08585259003 -0.04130316335 -0.04535251612 -0.1306440884 0.08916670067 -0.1017565893 -0.06189286381 -0.09998948306 -0.08669079697 -0.08319838008 -0.1439686694 -0.1490690383 -0.1379903731 -0.03462459383 -0.07192417998 -0.09788384619 -0.1417866291 --0.002998084607 -0.007048458362 -0.09470170489 -0.0306264983 -0.08590308798 0.05442819559 0.08841395799 -0.02166215633 -0.08996760275 0.06057714447 -0.1040389306 -0.07850433916 -0.07003305544 -0.005537123589 -0.1037938204 -0.09058520833 -0.05618867064 -0.03876937392 -0.04018389472 0.9805866806 0.2387624865 0.02450261042 0.097367308 0.1053184511 0.01722939543 0.05270069434 0.04628753739 0.1156660664 -0.08102628735 -0.09102836735 -0.1055281387 -0.09321300633 0.04177775167 0.03729976283 0.03754982732 0.05675572451 -0.08521954918 -0.07714100006 -0.1032527089 -0.08858524473 0.08956697989 0.2834441204 0.1298638304 0.1365795868 0.1770941682 0.1383102976 -0.005052138514 -0.01084780805 -0.007031432677 -0.07680530363 -0.06713084577 -0.08093873789 -0.09065324221 -0.07993864785 -0.02934422423 -0.02057315932 0.1637444639 0.1661199747 0.1497956801 0.1126806929 0.08242159779 0.006593018757 -0.01990174464 -0.0554961238 -0.004343258494 -0.07877012268 -0.0947861489 -0.1023494624 -0.085907058 -0.09800317835 -0.09599457534 0.03674568663 0.04826464028 -0.1070529021 -0.1112042434 -0.1015737283 -0.1117990163 -0.1200147857 -0.07393878187 -0.06684044649 -0.1083005431 -0.04839473748 -0.06489692464 -0.07258372676 -0.0698378953 -0.06788162051 -0.01720309701 -0.09946245734 -0.102726754 -0.1018474232 -0.09015697157 -0.09196671926 -0.0740978492 -0.06642439933 -0.08036798767 0.06337799759 0.06318791634 0.04626248228 -0.007702823609 0.05826834778 0.04997055952 -0.004179837976 0.04145001906 0.03069428516 -0.01239647987 0.05415308081 -0.02748765874 -0.1024190219 0.1059148363 0.09919872961 0.07322664799 0.09317301505 0.1202202509 -0.004789872972 -0.01022257584 -0.03378975827 -0.03673667534 0.05737916868 0.1159050792 -0.01112950863 --0.01262132299 -0.003521650205 -0.0755653858 -0.006844457183 -0.08907653927 0.05998695932 0.1052065865 0.0003120167421 -0.05803292713 0.04945735997 -0.1034709394 -0.07055320851 -0.0753179228 -0.01208194886 -0.08608924454 -0.06430475913 -0.06052026558 -0.05289318949 -0.02969221811 0.2387624865 1.032458533 0.05652403656 0.07179127371 0.09877791293 0.04368103984 0.0173434384 0.006674192836 0.06987464393 -0.07005948144 -0.09729977795 -0.08978231452 -0.1076523497 0.03076437324 0.02590941086 0.0256809415 0.02581310239 -0.08302139758 -0.08118786975 -0.1007975775 -0.09666903463 0.1048195146 0.1143436239 0.1221741045 0.0639163037 0.1215139648 0.1052002695 -0.008960498685 -0.002627407117 -0.007718642983 -0.05279890358 -0.0379514037 -0.09091079211 -0.07243657039 -0.07939326149 -0.006904438935 0.0007140924414 0.1566581234 0.1745928013 0.166420574 0.2115054659 0.1013163849 0.02704707002 -0.01144712319 -0.08395197594 -0.00926170627 -0.08205070381 -0.08715208727 -0.0931714367 -0.08121392342 -0.07857233776 -0.06933944309 0.02419687116 0.03943938635 -0.09501859281 -0.09357459837 -0.1192271908 -0.1057141987 -0.1236243064 -0.044677762 -0.06812159395 -0.1227834326 -0.03311824749 -0.04458748434 -0.05882959381 -0.07566309989 -0.0665812151 0.006516283222 -0.1064438165 -0.1086005414 -0.1080043374 -0.1099485512 -0.09641039072 -0.08166431753 -0.08744063841 -0.06373384933 0.03066842506 0.04446459609 0.09480190708 0.01182301475 0.06741584095 0.06475820454 -0.00413878292 0.0392498909 0.03708101924 -0.01932005212 0.04382205708 -0.01067749251 -0.07980237432 0.07181071626 0.07207381258 0.059581597 0.07599635178 0.08397690755 -0.004913796391 -0.001852571464 0.004076252558 -0.03533897048 0.06629766551 0.08958332751 -0.004144491074 --0.01096679168 -0.01639013803 0.03902356053 -0.01370057772 -0.04007091897 -0.05730398146 -0.06882215942 -0.00756690685 -0.04742981315 -0.0588416381 -0.04334572384 -0.05459761554 -0.0365380138 -0.02407957527 -0.0386654209 -0.03307317382 -0.05763273832 -0.07071121954 -0.06163115136 0.02450261042 0.05652403656 0.9354018643 0.1383881198 0.0288020045 0.0382730682 0.06486444846 0.0663242045 0.01590707097 -0.03350312454 -0.05864357691 -0.0350956652 -0.05772974243 -0.06301489407 -0.09062289739 -0.09008394377 -0.08742825122 0.02749269773 -0.03788246138 -0.01194195919 -0.03078093646 0.1488087649 0.02806531755 0.03612458908 0.03555458719 0.0219378908 0.02673489115 -0.02193214856 -0.01913683545 -0.02233230211 -0.04846698956 -0.04666982742 -0.06422690295 -0.05317100184 -0.05294439548 -0.01639198502 -0.006371862798 0.1439376245 0.1005629675 0.1395334534 0.1355607383 0.1226476826 0.0455406132 -0.004660665694 -0.05166935334 -0.01149058695 -0.06882275618 -0.05943126362 -0.04310579219 -0.04685923664 -0.04388014216 -0.02162638661 -0.06496750477 -0.06410690313 -0.03152652361 -0.0325689084 -0.02011656 -0.03825408858 -0.05873653593 -0.02296492138 -0.0623222851 -0.05171103218 -0.02663175231 -0.04468613469 0.01458697845 -0.02552455622 -0.06705078016 -0.008648696411 -0.03976356973 -0.05552663803 0.05367573373 0.06281437098 0.04874208452 0.01273318316 0.03452074685 -0.02220751798 0.002523275902 0.02581453328 0.09269826943 -0.01541633711 -0.0362709008 0.02540668457 -0.01848688147 0.03022038159 -0.03636104672 -0.03452352459 0.03234151289 -0.02172866471 0.02908838517 0.05269197782 0.02339739301 0.03508918248 0.03913825446 0.03929664724 -0.02539871876 -0.03130931635 -0.001729107861 -0.04681945159 -0.03905849972 0.03215888193 -0.02174848045 --0.01385622703 -0.02960376309 -0.08827718775 -0.01775414789 -0.08405603215 0.04826756741 0.05818315416 0.01182917665 -0.08570934921 0.05858759843 -0.1068044157 -0.07836669067 -0.0771502256 -0.003318705385 -0.09099963193 -0.1075147184 -0.08292672209 -0.09181221757 -0.08797984999 0.097367308 0.07179127371 0.1383881198 1.1441287 0.3775804432 0.01213309631 0.02510663198 0.02756195997 0.0910247678 -0.1014732163 -0.1223548798 -0.1086189047 -0.1131910701 0.03973953669 0.03596542464 0.03369963367 0.02751188641 -0.07903154071 -0.08379143446 -0.09561319256 -0.09290686807 0.1236381643 0.1392153417 0.1024532508 0.1285826892 0.08279867394 0.1068793701 -0.009726337902 -0.00156467391 -0.02136877888 -0.06073941288 -0.06046653216 -0.1013899823 -0.07041994841 -0.08750542521 -0.009289998822 0.005080839241 0.1921435711 0.1208187857 0.1384906853 0.1139679296 0.09105858147 0.1021643065 0.002520244036 -0.07729772631 0.008433899675 -0.07439203194 -0.07594145632 -0.08955522498 -0.09067672922 -0.09854674912 -0.0853114289 0.03315686338 0.01128207602 -0.1126902479 -0.1018561416 -0.1275185469 -0.1281789772 -0.1161747156 -0.03484192313 -0.09586467052 -0.07393060854 -0.02386975074 -0.05371408097 -0.1130237909 -0.09023159644 -0.06682193213 0.003703836934 -0.1087694334 -0.09670053154 -0.08849540731 -0.06970902276 -0.08794555793 -0.08117093501 -0.08564308884 -0.07198535756 0.07345091527 0.06503175046 0.06631921303 0.006603512615 0.0203674161 0.05576528809 0.006666149271 0.06733597247 0.02958353007 -0.01516415426 0.02079183859 -0.01158486432 -0.1007807603 0.1159075045 0.09436493961 0.08683558046 0.1353527887 0.1197551495 -0.01352109543 -0.0006071026063 0.01332400138 -0.05675007922 0.01541500059 0.1009401279 -0.01421826516 --0.001741889765 -0.02940049324 -0.08865344347 -0.02133567648 -0.08202484044 0.02315827274 0.04493063721 -0.003606207006 -0.07585217874 0.07787028621 -0.1056563183 -0.07359394984 -0.08274358217 -0.009608487334 -0.1104338587 -0.1088431425 -0.09553992732 -0.08202503218 -0.07325143178 0.1053184511 0.09877791293 0.0288020045 0.3775804432 1.090331104 0.01552776898 0.04534970483 0.03991163827 0.07292332481 -0.08700412299 -0.1154449314 -0.1214178226 -0.1232115679 0.03244843351 0.008426480971 0.007518050312 0.01797539653 -0.08963905746 -0.1063815049 -0.1130779084 -0.09959300548 0.07588724913 0.1452980738 0.08983239947 0.09720938821 0.1548595031 0.1879726806 0.02562639764 0.01483847695 0.01464609618 -0.05408995644 -0.0789150912 -0.1069770181 -0.07064078122 -0.08403555611 -0.02906394948 0.005834175748 0.3192558146 0.07938030497 0.09233313622 0.08211776756 0.07364450036 0.04271226759 0.01192849448 -0.07592128291 0.03394142917 -0.07969120511 -0.08655234714 -0.09542929455 -0.1061224709 -0.1035571038 -0.09049314239 0.01309186265 0.01491739216 -0.1153154226 -0.111640168 -0.130522196 -0.1384220645 -0.1217978352 -0.02935396006 -0.08657149494 -0.09131358381 -0.02503576944 -0.04868685866 -0.1095259483 -0.07858099205 -0.07301482992 -0.004973176231 -0.1127135352 -0.09773335955 -0.09968550411 -0.07915124602 -0.09616525755 -0.08821318619 -0.08553699285 -0.07237874364 0.09273348865 0.08585824965 0.07199900035 0.01863593795 -0.002980739676 0.04666170208 -0.01232449811 0.07361989647 0.05383697184 -0.0207018026 0.08443455456 0.00119066776 -0.1027968787 0.09108504636 0.07442750301 0.1428954148 0.2286809512 0.1506062528 -0.009464031438 -0.01297135628 -0.01063062439 -0.02015930791 -0.007402274844 0.1862831876 -0.007792927349 --0.02935160031 -0.03035974883 -0.04839113184 -0.04545372067 -0.04347078607 -0.07226101176 -0.07116835447 -0.01996041035 -0.004315801994 -0.0334825489 -0.03887798529 0.025021988 -0.03424966555 -0.02020021678 -0.04652627743 0.004210918304 -0.05024644506 -0.03809176494 -0.04284781819 0.01722939543 0.04368103984 0.0382730682 0.01213309631 0.01552776898 0.9461650761 0.4809876234 0.4211603317 0.02786877881 -0.01572429491 -0.02730335355 -0.02332716424 -0.01113608713 -0.08386534612 -0.07437476017 -0.07283826533 -0.0906426544 -0.0267866301 -0.02795011404 -0.05826411016 -0.0309681462 0.020705809 0.0227296737 0.0617952821 0.07056983647 0.04112824705 0.03273396264 -0.006435364233 -0.01499246438 -0.01297177484 -0.04065959934 -0.0421332307 -0.08841718676 -0.06092142139 -0.0734285781 -0.008736493306 -0.02195621665 0.0838355291 0.000289194351 0.01680487817 0.03100180315 0.02389495279 0.02672060821 -0.01455306734 -0.02081598803 -0.02944319423 -0.01209989982 -0.05053996461 -0.0174988064 -0.02781116881 -0.004447167962 -0.02763764622 -0.04038784668 -0.04175612724 -0.01870588017 -0.02526843751 -0.03965138306 -0.006966799497 -0.04594820132 -0.01343614972 -0.02109866546 -0.04674683669 -0.01554515447 -0.03623118901 -0.06964114624 -0.05893466449 -0.02500251037 -0.009379486069 -0.01872395884 -0.009967959068 -0.05580978937 -0.03635417361 -0.05934438016 -0.06019081 -0.03730079073 -0.01042623315 0.02744324606 0.02530660601 0.1277792391 -0.01492514991 -0.03911793445 0.0319477975 -0.01326639361 0.05659338131 -0.03425734406 -0.01148699773 0.06195865651 -0.005537690574 -0.05258917776 0.04655238751 0.06799970732 -0.0003367802099 -0.005362883708 0.0103286051 -0.03085940551 -0.03361536555 -0.001846026649 -0.02852890835 -0.04331690974 0.003195970233 -0.01777346994 --0.0237710064 -0.01171350778 -0.0408248099 -0.04466335965 -0.05571946054 -0.09537731907 -0.09257706249 -0.04555344339 0.006002637752 -0.06072138051 -0.03672187942 0.02368693876 -0.04301040508 -0.03015412227 -0.08159079803 0.00490589737 -0.04505223303 -0.0488011802 -0.03194819501 0.05270069434 0.0173434384 0.06486444846 0.02510663198 0.04534970483 0.4809876234 0.9481528713 0.5009865164 0.0193208213 -0.01846480148 -0.01605524725 -0.01232797755 0.02344635333 -0.08536492086 -0.0796622983 -0.07686718771 -0.08996166986 -0.03440352487 -0.02809943078 -0.06897398629 -0.05397937442 0.008610858698 0.03612673777 0.05901964191 0.06854510518 0.04670408282 0.03489707264 -0.03928532671 -0.03717843261 -0.03637933562 -0.04210977716 -0.03593267994 -0.06660018299 -0.04605005485 -0.05100029269 -0.005436620684 -0.009511673214 0.1613212746 -0.01422181542 -0.001815927928 0.0140443926 0.00523767549 0.003140950912 -0.01848723716 -0.03773219895 -0.01443026185 -0.02285306843 -0.04758374907 -0.05401487887 -0.05186680063 -0.02025524253 -0.03167126296 -0.08154286064 -0.07291410051 -0.01403403626 -0.03443410372 -0.01495155867 -0.007187148402 -0.01653626015 -0.02609030271 -0.04577946442 -0.02502358247 -0.03264192076 -0.03319381618 -0.0513518013 -0.06370496565 -0.04204952631 0.00155234127 -0.02000943237 -0.0138722035 -0.04626739359 -0.04576607704 -0.06743843175 -0.05272337614 -0.05606394962 -0.0193799626 0.07089837713 0.04406868286 0.1640175453 -0.008412003361 -0.07075801314 0.0670321587 -0.02345074385 0.07769787912 -0.05285952636 -0.02135156629 0.04595224817 -0.0192452745 -0.04092697304 0.117405054 0.1351034463 0.001051413213 -0.002677761829 0.01986139278 -0.04136374412 -0.0589915714 -0.02248378535 -0.02788167086 -0.0750801333 0.009220304393 -0.01914676899 --0.02186454375 -0.01332908607 -0.0433819855 -0.03206536432 -0.04871292066 -0.09334439925 -0.08227233168 -0.03726595331 -0.02062748837 -0.06073209188 -0.04076951329 -0.01803750872 -0.05538984895 -0.02341974816 -0.04090615025 -0.00263917094 -0.06109894701 -0.05956426474 -0.04696208946 0.04628753739 0.006674192836 0.0663242045 0.02756195997 0.03991163827 0.4211603317 0.5009865164 0.9452251794 0.04408302333 0.007198533029 -0.01340621712 -0.01457565729 0.01664857865 -0.09479398617 -0.08971083987 -0.08987304498 -0.09247533012 -0.02359136558 -0.02133475546 -0.0621700536 -0.02719601553 -0.0006079885329 0.0442035027 0.05982610931 0.07554518469 0.05883960577 0.0324099669 -0.02357569296 -0.02147303651 -0.01234194689 -0.04900477906 -0.05429297844 -0.06554800953 -0.03660933918 -0.04277262707 -0.007484812012 -0.01914084737 0.1583371199 -0.005842279246 0.00386931367 0.001987625956 0.01518435473 0.01194830232 -0.0189742873 -0.04907971865 -0.004954599929 -0.04472465206 -0.06550294722 -0.02562402858 -0.03642371588 -0.02560713628 -0.0453254819 -0.06965775987 -0.08243276692 -0.04238433001 -0.0385524614 -0.004201162268 -0.02608459055 -0.03943562439 -0.01273608887 -0.01597333115 -0.02886006356 -0.02228278222 -0.02892894219 -0.05923380957 -0.03786220638 -0.04619026891 0.0119819338 -0.01780591133 -0.01353802681 -0.03663598381 -0.03896660887 -0.04199045169 -0.04050058428 -0.0474410782 -0.0312705432 0.08182843673 0.0598152882 0.1350370699 -0.007477032865 -0.07867674441 0.04949445256 -0.0313369759 0.04988755792 -0.03632248705 -0.02235101636 0.05528809246 -0.008890926773 -0.03853579254 0.08058344803 0.08624958849 0.003177662358 -0.001099300836 0.02565383125 -0.02892953264 -0.03689266877 -0.01250272443 -0.02766652498 -0.08021964151 0.01275755243 -0.01567937346 -0.02025969204 0.01843043741 -0.08328915865 -0.01066516846 -0.1059663258 0.01009366861 0.05335687928 -0.001074905452 -0.07026373446 0.002007041038 -0.1205856064 -0.0551773647 -0.09968574757 -0.001270813254 -0.09740469177 -0.0934625006 -0.07997860632 -0.07765891337 -0.08064656501 0.1156660664 0.06987464393 0.01590707097 0.0910247678 0.07292332481 0.02786877881 0.0193208213 0.04408302333 1.064690572 -0.08725654342 -0.1000609689 -0.1219002227 -0.1188844794 -0.03240280069 -0.008899985375 -0.009853727802 -0.02168161966 -0.08975873034 -0.1061804926 -0.1201393664 -0.09601835012 0.05334989102 0.104676115 0.1382212542 0.1268853018 0.08733915022 0.1095532049 0.003822791926 0.003962648263 -0.001786801378 -0.07120512795 -0.06867688766 -0.103014125 -0.08912251593 -0.0827830032 -0.001814347026 0.007993786251 0.08493126174 0.07319431004 0.07108182587 0.05196428089 0.06211411405 0.2353277739 -0.0002930883315 -0.07587057565 0.0287999668 -0.07455433247 -0.09832262161 -0.09635657443 -0.09562456757 -0.1024432242 -0.09017154016 0.004488270033 0.03540750421 -0.1062091073 -0.1185142502 -0.1213553421 -0.1156954009 -0.1150891765 -0.04645117896 -0.07916472594 -0.1072218106 -0.04321389391 -0.04778702442 -0.104650407 -0.09996422859 -0.07316672683 0.008962007581 -0.1007959002 -0.1002035454 -0.08656226023 -0.08182753445 -0.08890651564 -0.08343590364 -0.06926441825 -0.07793782318 0.2616797601 0.2219894696 0.01612993039 -0.01108335514 0.03140988033 0.2433325125 0.2283453974 0.2290957049 0.2576046035 -0.004376540278 0.03484659353 -0.006626607241 -0.09096396039 0.05634606828 0.06498093617 0.2272553797 0.03494170838 0.0437640079 0.007841964218 0.002103282329 -0.0002616414904 -0.02248458723 0.02716122524 0.02490243598 0.01410748052 --0.1200158552 -0.1510381349 0.09575526927 -0.1156696251 0.02828518854 -0.01949367207 -0.01616399144 -0.1398893259 0.01950906733 0.003080386755 0.07846249737 0.04390703892 0.07025506807 -0.1344439614 0.07728200383 0.0572714221 0.06510184741 0.06262016381 0.08184524165 -0.08102628735 -0.07005948144 -0.03350312454 -0.1014732163 -0.08700412299 -0.01572429491 -0.01846480148 0.007198533029 -0.08725654342 0.9145599278 0.4311953047 0.4573724274 0.4420468191 -0.01947161971 -0.0313840383 -0.03707437367 -0.02684515006 0.08752877119 0.07313545072 0.09736336415 0.06434979566 -0.08826538388 -0.07453620626 -0.08174370125 -0.08442993096 -0.09111116866 -0.1042837452 -0.1534387527 -0.1491880461 -0.1373755979 0.0882120287 0.05348491919 0.07612438952 0.05974872737 0.0398572522 -0.1312241491 -0.1333221585 -0.1271446297 -0.08215486337 -0.09717186247 -0.09481442067 -0.09018916901 -0.07899782546 -0.1381358485 0.07046830459 -0.1221502456 0.09992932554 0.09728402861 0.05859249813 0.09523053683 0.1069418134 0.08800772659 -0.01843409305 -0.01242548044 0.09554723094 0.1075209709 0.1053793143 0.06470035349 0.1007922992 -0.01306875475 0.08340284875 0.04588754749 -0.002726862706 -0.007847139019 0.07586908604 0.06625269159 0.05505503725 -0.1227290925 0.07679271023 0.06212230983 0.0725914432 0.0961828998 0.07997465795 0.06033058927 0.0850622247 0.09338014371 -0.09724666509 -0.07626724839 -0.05872940852 -0.1314995498 -0.09834047709 -0.08163522247 -0.0494368999 -0.08301598164 -0.08592818303 -0.02913156066 -0.02812194636 -0.1311617441 0.08738543921 -0.07893218457 -0.07514169934 -0.1036289366 -0.08385784311 -0.08395966904 -0.1436176063 -0.1495262369 -0.127007012 -0.02974309034 -0.09829543937 -0.0905681975 -0.1485333876 --0.1220850259 -0.1317365107 0.06211194602 -0.1316686377 0.04468217917 -0.01806927882 -0.06379795047 -0.1540940965 0.007674835375 -0.04028952485 0.0654648538 0.04337918835 0.06119237166 -0.1383233426 0.06104142471 0.2636530725 0.08383748929 0.08216308717 0.09309466526 -0.09102836735 -0.09729977795 -0.05864357691 -0.1223548798 -0.1154449314 -0.02730335355 -0.01605524725 -0.01340621712 -0.1000609689 0.4311953047 0.8891762377 0.4926585424 0.4293416304 -0.02947471176 -0.02541985209 -0.02549286047 -0.01963225669 0.07006081993 0.0598473922 0.09589421473 0.05204718416 -0.1220401637 -0.1085662542 -0.1070032098 -0.1092161692 -0.1059694408 -0.1314815013 -0.1590871102 -0.1433819296 -0.1384149529 0.1230980017 0.129186639 0.07122440984 0.05134485784 0.03498295864 -0.1407681577 -0.146865743 -0.1514587316 -0.1060879895 -0.1230637152 -0.1141261093 -0.09934662875 -0.1085726278 -0.1480509137 0.1091488338 -0.1303157827 0.0959611469 0.1280249525 0.09000835439 0.1116084523 0.08495805351 0.0755619741 -0.02892934172 -0.03356417522 0.2442672532 0.1752798646 0.2309806944 0.310909012 0.2410171493 -0.03319377517 0.07887022081 0.099589245 -0.02198248243 -0.03064891489 0.08055376474 0.07708132544 0.02060384901 -0.1477099787 0.1157351152 0.131823391 0.06032987028 0.08325328815 0.07402793148 0.07244832734 0.0931453209 0.06322020153 -0.1109452323 -0.1003150268 -0.09110084038 -0.1501204191 -0.1158554039 -0.1005073344 -0.07445530394 -0.1065378376 -0.1003647871 -0.0359936551 -0.05583996441 -0.1399079003 0.05910788834 -0.09734199158 -0.06957516645 -0.117514511 -0.1174801256 -0.1248997519 -0.1399517229 -0.1608932564 -0.1483265264 -0.04950061476 -0.1110157816 -0.1130986653 -0.1427997998 --0.1289179349 -0.1348898172 0.07934168359 -0.1317635014 0.02713775539 -0.02399413154 -0.05146340319 -0.1399311762 0.007745046499 -0.0406986355 0.07052865251 0.05057973766 0.05357895012 -0.1404487725 0.06502915623 0.2366937996 0.07133204466 0.05678111581 0.09241068439 -0.1055281387 -0.08978231452 -0.0350956652 -0.1086189047 -0.1214178226 -0.02332716424 -0.01232797755 -0.01457565729 -0.1219002227 0.4573724274 0.4926585424 0.8782949376 0.4054633977 -0.04556608481 -0.04867768564 -0.0501257534 -0.0432749931 0.05745818487 0.06563008622 0.07788152064 0.05075360107 -0.1061870029 -0.1154565912 -0.1228472952 -0.1304914024 -0.09862659713 -0.1259102257 -0.1598010859 -0.1478355098 -0.1450727423 0.0983624476 0.1240710646 0.08322593621 0.06603958015 0.05179811682 -0.1394206948 -0.1431714348 -0.1552118961 -0.09342452631 -0.1032194174 -0.09661568938 -0.09394393835 -0.1054463458 -0.150743192 0.07309283351 -0.128516909 0.07452357195 0.092598453 0.07368756165 0.09579238901 0.06133589814 0.05357995929 -0.04432552751 -0.03120562615 0.2523980787 0.2717078228 0.3191124833 0.2503516998 0.2674661655 -0.0262514195 0.06169173042 0.09169877676 -0.02798571255 -0.01522562657 0.08107365502 0.0586049929 0.01939612222 -0.1400566966 0.1285278602 0.1443700582 0.07314869779 0.1078765706 0.09324865168 0.06773091193 0.09749755403 0.07386625006 -0.1129151751 -0.1016509093 -0.08118085533 -0.1432431297 -0.1019671457 -0.1127751738 -0.06313450713 -0.1155122358 -0.108248444 -0.04402598106 -0.04698311943 -0.1366838281 0.0800716138 -0.08936454656 -0.07738494063 -0.1303246601 -0.09831796331 -0.1051429185 -0.1471295263 -0.1541982701 -0.1483651623 -0.04714157659 -0.09733161604 -0.1097584481 -0.152519837 --0.1325913137 -0.1701683397 0.06763491363 -0.1518176807 0.04095744796 -0.03855926104 -0.06527854054 -0.1532224277 0.05012399826 -0.04685624058 0.1142218789 0.07411105032 0.06331457698 -0.1509299423 0.09467046336 0.3070104602 0.07900779953 0.08597619007 0.1141749717 -0.09321300633 -0.1076523497 -0.05772974243 -0.1131910701 -0.1232115679 -0.01113608713 0.02344635333 0.01664857865 -0.1188844794 0.4420468191 0.4293416304 0.4054633977 0.9371346735 -0.05890330479 -0.05262804226 -0.05542960739 -0.04801126011 0.03059396763 0.04700840868 0.05837253271 0.06309167462 -0.1153525799 -0.1190106462 -0.1221997119 -0.1260905376 -0.1173629738 -0.1331568792 -0.1617887013 -0.1624729944 -0.1490940383 0.1634780389 0.126628684 0.06718223788 0.06504304265 0.05641465184 -0.15903006 -0.1273540306 -0.1563094733 -0.1254948808 -0.1241129144 -0.1210368304 -0.1147153419 -0.09200380474 -0.1434217561 0.07569760289 -0.1460940186 0.1030685285 0.1718386303 0.1500443567 0.1248792456 0.06741664727 0.08657611001 -0.05220553287 -0.03344646725 0.2834256896 0.2994586999 0.2860513825 0.2389626787 0.2937194692 -0.04705977604 0.08095917657 0.0975216524 -0.0580633252 -0.03357849357 0.06199633705 0.05173238749 0.04158510047 -0.1481018645 0.1686793665 0.157015152 0.06148961319 0.03297117252 0.03940022036 0.03543735179 0.07797274499 0.1005584717 -0.1049884254 -0.1134168105 -0.06169323734 -0.1515429615 -0.1143719681 -0.09122351659 -0.06730281202 -0.09006938442 -0.1077858874 -0.0356334233 -0.07308892322 -0.1478731858 0.07403876444 -0.1136835733 -0.0840656232 -0.1104366269 -0.1187504556 -0.1185501753 -0.1701477611 -0.1780908767 -0.1492263462 -0.04208696771 -0.1146587931 -0.1244734085 -0.1644619548 --0.102435554 -0.1020530676 -0.03572355726 -0.1077343937 -0.03297469315 0.1952190986 0.2312745856 -0.1037445537 -0.03568598138 0.2832000756 -0.04361024521 -0.04035173486 -0.02605302349 -0.0958830732 -0.03804626848 -0.06151167527 -0.02924660407 -0.04153232875 -0.01614494663 0.04177775167 0.03076437324 -0.06301489407 0.03973953669 0.03244843351 -0.08386534612 -0.08536492086 -0.09479398617 -0.03240280069 -0.01947161971 -0.02947471176 -0.04556608481 -0.05890330479 1.010060316 0.5559991246 0.5522387097 0.5505312673 -0.04179607212 -0.03421980421 -0.03029900348 -0.03791204777 0.03880508665 0.05234968938 0.01945716219 0.08266137535 0.04852935095 0.06055253202 -0.1249266617 -0.1090188602 -0.1237719576 -0.01999475329 -0.04068507388 -0.03420485174 -0.02900303217 -0.02175486436 -0.1179876451 -0.1144686361 -0.09665456584 -0.01885230842 0.00947761322 0.02628608823 0.01243211475 0.02337220174 -0.1166120549 -0.006503348284 -0.08440821766 -0.02966870266 -0.01088585861 -0.03364270495 -0.02417439706 -0.02470942066 -0.02241328008 0.1834753818 0.1721850547 -0.07180199311 -0.06518987683 -0.0709972945 -0.06559014553 -0.07134370871 -0.06819970824 -0.008636942177 -0.0249852972 -0.06644318722 -0.07368978231 -0.03174686264 -0.01248896213 -0.01342869358 -0.1102220968 -0.06290622084 -0.06211615909 -0.0515393168 -0.03461514882 -0.02780342134 -0.05035029346 -0.01084570721 -0.01729811161 0.0268760123 0.02329491853 -0.09056896617 -0.1126676501 0.01243537071 -0.0257114102 -0.04670887399 -0.02032392416 -0.004118314458 -0.064385327 -0.08504510962 -0.09879148669 -0.07223378566 0.1131124716 0.07358100304 0.02917724995 0.1756079961 0.1373375025 -0.123724358 -0.1171148423 -0.1092386947 -0.07017272548 0.01327463917 0.1192937331 -0.08962592978 --0.1199200656 -0.1449181238 -0.05222251906 -0.1299338706 -0.03516473145 0.1627941257 0.2161130752 -0.1085600189 -0.03668085682 0.2274203098 -0.02960866489 -0.04696803752 0.003037731921 -0.1090341435 -0.02866477837 -0.04714709123 -0.0296202486 -0.02142398102 0.004949396202 0.03729976283 0.02590941086 -0.09062289739 0.03596542464 0.008426480971 -0.07437476017 -0.0796622983 -0.08971083987 -0.008899985375 -0.0313840383 -0.02541985209 -0.04867768564 -0.05262804226 0.5559991246 1.115433416 0.9875961767 0.578439953 -0.00824804753 -0.02099520749 -0.0207283586 -0.01392211885 0.01254744795 0.02153258829 0.01201118805 0.04004922867 0.0376819502 0.03467327592 -0.134038731 -0.1238476313 -0.1305949186 -0.01966867506 -0.0300369061 -0.009931052266 -0.02086356008 -0.02684950098 -0.1259856631 -0.1149445691 -0.1042643233 -0.009149114165 0.008053980435 -0.005041681986 -0.003895688191 -0.007204184633 -0.1167134023 -0.003989238087 -0.113864377 -0.01257538085 -0.02958686924 -0.0607091901 -0.05006651936 -0.015882424 -0.009317022671 0.2644456663 0.2596802833 -0.06739012239 -0.06386438943 -0.07072272587 -0.0649154574 -0.05372018892 -0.07473209069 0.001841063756 -0.01578459788 -0.05446147547 -0.08749955126 -0.01978807362 -0.01369018803 -0.02694563112 -0.1348927256 -0.05779707099 -0.0582331879 -0.05323409532 -0.02038032853 -0.02064578311 -0.03427792075 -0.03144296104 0.002431037758 -0.02892563967 0.0165158545 -0.09400050992 -0.1330070377 0.00410180135 -0.03816236787 -0.04471129177 -0.02535612727 -0.02891796762 -0.0496835565 -0.1040257632 -0.1139921855 -0.05560099276 0.07076998493 0.04462916085 0.005346396728 0.1314754338 0.1015015345 -0.146571627 -0.1376657867 -0.1220927906 -0.07954509847 0.003009868952 0.09779916247 -0.1186421024 --0.1205093134 -0.1412587823 -0.05535053272 -0.1302975665 -0.03210872543 0.1598365035 0.2174329725 -0.1069780678 -0.03383328934 0.2301752153 -0.02750298882 -0.04617834081 0.005587965347 -0.1084892285 -0.02609774068 -0.0501704106 -0.0278828552 -0.02119252244 0.004292253991 0.03754982732 0.0256809415 -0.09008394377 0.03369963367 0.007518050312 -0.07283826533 -0.07686718771 -0.08987304498 -0.009853727802 -0.03707437367 -0.02549286047 -0.0501257534 -0.05542960739 0.5522387097 0.9875961767 1.100890635 0.5754938732 -0.006503954077 -0.0166225509 -0.01579621113 -0.01045922673 0.01395685845 0.02338137835 0.008449669936 0.0399432924 0.0392604148 0.03450038767 -0.1349224654 -0.1236779334 -0.131968645 -0.0189635317 -0.03088277764 -0.01206759682 -0.01978161004 -0.02774594149 -0.124461706 -0.1145853863 -0.102206215 -0.008793363315 0.0095172181 -0.00393307825 -0.002449547404 -0.009890978042 -0.1157732677 -0.005324687387 -0.1144749199 -0.01026192942 -0.029017173 -0.06004418469 -0.051495374 -0.01864435747 -0.00867533662 0.2630768513 0.2595781842 -0.06872011873 -0.0647720455 -0.07292585479 -0.06478375331 -0.05425084404 -0.07733921262 0.004049728138 -0.01595978029 -0.05678792725 -0.0913425504 -0.01990095541 -0.01236685793 -0.02692723424 -0.1358119372 -0.06141317332 -0.05855719724 -0.05249135609 -0.01929130802 -0.02075238123 -0.03144813167 -0.02948713807 0.002871503788 -0.02633755662 0.01431897777 -0.09184720403 -0.1337363295 0.004549167022 -0.03704054654 -0.04586519392 -0.02624035125 -0.02761545911 -0.05405704168 -0.1029978441 -0.1108913745 -0.05483196934 0.07254055626 0.046197217 0.005458196347 0.1344778651 0.1025454999 -0.1470588044 -0.1362207017 -0.1209225145 -0.0803949705 0.002665073758 0.09724592475 -0.1202760258 --0.1129501885 -0.1173042157 -0.0473754496 -0.1220803263 -0.01673416679 0.1608796129 0.207122875 -0.09805166755 -0.03027798557 0.2924352665 0.003903438057 -0.02602749712 0.006024851642 -0.1150903377 -0.01391000535 -0.03825701583 -0.01103509328 0.0007755170457 0.01354234123 0.05675572451 0.02581310239 -0.08742825122 0.02751188641 0.01797539653 -0.0906426544 -0.08996166986 -0.09247533012 -0.02168161966 -0.02684515006 -0.01963225669 -0.0432749931 -0.04801126011 0.5505312673 0.578439953 0.5754938732 1.039329828 -0.02028013346 -0.02668348686 -0.02039487245 -0.01510461714 0.008349914642 0.02621899303 -0.006151922768 0.02408271845 0.0440048953 0.02584801623 -0.1288718822 -0.1181843916 -0.1255319196 -0.01806423145 -0.02085275288 0.01018106282 -0.005620081855 -0.01858336709 -0.1289809688 -0.1121513679 -0.09659736504 -0.02112532065 -0.01152747019 -0.00866715038 -0.003104070349 -0.008870248714 -0.1115712063 -0.002319216683 -0.09852087335 -0.01426440134 -0.02597531035 -0.05648076846 -0.04461514569 -0.02839638398 0.0006793360355 0.2511718365 0.2421238162 -0.0720589962 -0.06301114316 -0.06915321557 -0.05561182623 -0.07161597816 -0.07409295318 -0.0005670863514 -0.01780152254 -0.05636903984 -0.08743028085 -0.02204979278 0.0001976749928 -0.034711451 -0.1319140639 -0.02900063846 -0.05106779893 -0.05466509083 -0.0223871857 -0.0233719075 -0.03595813742 -0.008760643901 0.01518859119 -0.009236011591 -0.005854997545 -0.1010154915 -0.1095945707 0.01181109278 -0.03849108287 -0.05843054876 -0.02246709423 -0.03098044607 -0.05127062851 -0.09058788797 -0.1024421545 -0.05889930811 0.1081274734 0.06399659585 -0.01591386656 0.1428331063 0.1300344207 -0.1314582672 -0.1209757817 -0.1190108305 -0.05915513229 0.009214069059 0.1131234996 -0.1098011319 --0.1168104616 -0.1355677181 0.1556765785 -0.1217942458 0.1394086698 -0.01631051843 -0.06322717403 -0.1254347917 0.002206663541 -0.0295222698 0.08873189862 0.02099681039 0.07692322247 -0.134742558 0.1118191733 0.03329806502 0.05659248307 0.05722008134 0.02620373617 -0.08521954918 -0.08302139758 0.02749269773 -0.07903154071 -0.08963905746 -0.0267866301 -0.03440352487 -0.02359136558 -0.08975873034 0.08752877119 0.07006081993 0.05745818487 0.03059396763 -0.04179607212 -0.00824804753 -0.006503954077 -0.02028013346 0.8735626888 0.4149544823 0.4169237049 0.4249276545 -0.07977004644 -0.08136271334 -0.08006440588 -0.06862871802 -0.08715968898 -0.1063988336 -0.1640476447 -0.1483172308 -0.1472530906 0.05043398858 0.05129156525 0.04745737363 0.02573410247 0.03001466194 -0.1087568908 -0.1292100896 -0.1373201772 -0.09690443376 -0.08226449607 -0.09618506258 -0.08263688675 -0.09336722938 -0.1250756987 0.08684844291 -0.1159190621 0.08730417135 0.05135170327 0.02881879986 0.06204450756 0.06798965869 0.05396273834 -0.002226775412 -0.002842370279 2.886260561e-05 0.02012667206 0.01351778935 -0.01478693232 0.002385096379 -0.06210625846 0.1086863467 0.07407772073 -0.03429535467 -0.03205500937 0.1535737808 0.1211206289 0.03730259499 -0.1116915975 0.01957390728 0.04516180714 0.2581610434 0.1980282321 0.2193105899 0.2206692445 0.203293552 0.06824154069 -0.0907198467 -0.08160323449 -0.08484402691 -0.1598284805 -0.07760405403 -0.09068968456 -0.05937133255 -0.08853374232 -0.0741096944 -0.04576599679 -0.02043649713 -0.1364279957 0.2189747787 -0.07879738494 -0.07146924255 -0.1011681637 -0.08394876467 -0.07853081077 -0.1282411774 -0.1354712511 -0.1114816311 -0.08213927432 -0.07786897282 -0.0827214469 -0.1339571122 --0.1234186601 -0.1133153341 0.1003408598 -0.1139856195 0.2450770521 -0.03532769231 -0.06893086884 -0.1338315144 0.01722472301 -0.02627665846 0.257263615 0.02403373745 0.07981682214 -0.1173833527 0.2408077078 0.0564565387 0.06587762135 0.05504369617 0.03602693292 -0.07714100006 -0.08118786975 -0.03788246138 -0.08379143446 -0.1063815049 -0.02795011404 -0.02809943078 -0.02133475546 -0.1061804926 0.07313545072 0.0598473922 0.06563008622 0.04700840868 -0.03421980421 -0.02099520749 -0.0166225509 -0.02668348686 0.4149544823 0.9137831811 0.5032157822 0.3896513013 -0.0802978289 -0.07797426119 -0.08364127223 -0.07886132763 -0.08531765363 -0.1105568717 -0.1498538948 -0.1587251095 -0.16135074 0.03601184125 0.03314212025 0.06865535985 0.04619517123 0.06185160796 -0.1295610278 -0.1457646317 -0.1288668632 -0.1136105345 -0.09332798491 -0.09701948966 -0.07984386449 -0.09496964992 -0.1410133945 0.08366926691 -0.1339919063 0.06836780741 0.08389069252 0.06158060229 0.08956890466 0.06176326008 0.04747651945 -0.01600253669 -0.02244517719 0.02099517854 0.05648962767 0.03361680923 0.03011119145 0.03807822493 -0.0674952133 0.2044581481 0.09350757024 -0.05253070547 -0.04080505792 0.1058631452 0.1006801251 0.08701667288 -0.1397544397 0.04247615361 0.07309302566 0.1858655766 0.09603368339 0.154144287 0.1660051709 0.1430726199 0.03690893876 -0.08641560299 -0.09222019972 -0.08397357978 -0.1428223203 -0.08713806491 -0.09029806723 -0.07339255412 -0.106840824 -0.07247523965 -0.05322243219 -0.008553101873 -0.1333261263 0.1128364771 -0.09623150681 -0.08629485797 -0.1211665244 -0.09767492038 -0.09599033806 -0.1260363313 -0.1215856381 -0.1401421227 -0.0649623813 -0.08442239869 -0.09514349844 -0.1237712896 --0.1440226645 -0.1370830394 0.1213188274 -0.1202199062 0.2210722472 -0.04389122448 -0.07716410565 -0.1314955759 0.01630134348 -0.03510801983 0.2754236509 0.01735111055 0.08161210016 -0.1248573356 0.288875672 0.05239088969 0.0579469947 0.02395838345 0.03250240556 -0.1032527089 -0.1007975775 -0.01194195919 -0.09561319256 -0.1130779084 -0.05826411016 -0.06897398629 -0.0621700536 -0.1201393664 0.09736336415 0.09589421473 0.07788152064 0.05837253271 -0.03029900348 -0.0207283586 -0.01579621113 -0.02039487245 0.4169237049 0.5032157822 0.9237053235 0.4379204283 -0.081707965 -0.09724862316 -0.1077731499 -0.09855659659 -0.09423306828 -0.1192187799 -0.1462279701 -0.1496987854 -0.1560414383 0.03915789157 0.04251955423 0.08913512672 0.08529856328 0.08081241219 -0.127169138 -0.1434504341 -0.1537337744 -0.1269803063 -0.1188246685 -0.106142097 -0.08268095653 -0.09503790382 -0.1366496226 0.09473092751 -0.1317143363 0.1036855703 0.08367294787 0.05297643622 0.08889113813 0.06011204034 0.06547704761 -0.02302992506 -0.02073752415 0.02648685444 0.05169121653 0.04251873952 0.04948907854 0.03733156388 -0.05299198692 0.192918054 0.08731027553 -0.04501984591 -0.03593681594 0.1282674331 0.1177947903 0.06336885951 -0.1435893156 0.0586881436 0.07724477951 0.1993034184 0.1506565712 0.1355613739 0.1472358767 0.1618612885 0.06511835667 -0.1073136575 -0.1003791288 -0.1083726952 -0.137426247 -0.1020839342 -0.1016890716 -0.07236398822 -0.1139096776 -0.07101281504 -0.03897035762 0.02829939952 -0.1245045312 0.1407042238 -0.1103266676 -0.101312753 -0.1289299807 -0.1030414005 -0.1050341949 -0.1276381102 -0.1222432624 -0.1390045807 -0.05760705021 -0.1010156507 -0.1016396142 -0.1428448719 --0.1260998058 -0.1222523513 0.09663424049 -0.1250689465 0.2481755464 -0.02762103587 -0.04431112877 -0.1327894085 0.02498796184 -0.01414072268 0.2917461023 0.04865132134 0.06722034176 -0.1305032412 0.2579590419 0.04704849376 0.06915816888 0.04973898356 0.04684596077 -0.08858524473 -0.09666903463 -0.03078093646 -0.09290686807 -0.09959300548 -0.0309681462 -0.05397937442 -0.02719601553 -0.09601835012 0.06434979566 0.05204718416 0.05075360107 0.06309167462 -0.03791204777 -0.01392211885 -0.01045922673 -0.01510461714 0.4249276545 0.3896513013 0.4379204283 0.9153381721 -0.05494664915 -0.08419627831 -0.1016215304 -0.07615400511 -0.08855134965 -0.1069280195 -0.1372559242 -0.1432225336 -0.1571973971 0.02835317753 0.02455221603 0.04833031057 0.03538728891 0.03863790447 -0.1246353998 -0.1479181402 -0.1515919742 -0.1002142067 -0.09744524463 -0.09089662015 -0.07669321095 -0.09360443603 -0.1392237628 0.0829268266 -0.1302191495 0.08644524993 0.08042347403 0.05155639203 0.06141497214 0.06741414757 0.04935258543 -0.0176599622 -0.005500434936 0.03569407256 0.03347978228 0.02764633339 0.01110247427 0.04463404701 -0.05898023835 0.2089759336 0.08884298697 -0.0582266836 -0.06184855021 0.146385653 0.1231344323 0.08091464699 -0.1197341551 0.03589772336 0.03862736783 0.1664704724 0.1560228402 0.1780893557 0.1873897727 0.1403350124 0.06867259857 -0.1158412529 -0.1122039968 -0.09082326735 -0.1589269618 -0.08211110579 -0.09953343407 -0.07513864885 -0.1097239715 -0.06351577222 -0.04649365898 -0.02637563302 -0.1234873685 0.1417081071 -0.09415334638 -0.08981656647 -0.131454278 -0.1046409258 -0.1108913388 -0.1100231719 -0.1217618612 -0.1256780654 -0.06532435541 -0.07969835374 -0.1009516896 -0.1351476245 -0.0120543117 0.01793422663 -0.08661852279 -0.009174358804 -0.08162196437 0.0147726124 0.06808342225 0.005875808667 -0.07903443612 0.06121191598 -0.07642771577 -0.08407299609 -0.08649228403 0.0007533385287 -0.07167592201 -0.09095413936 -0.06050949826 -0.07721265979 -0.08066132709 0.08956697989 0.1048195146 0.1488087649 0.1236381643 0.07588724913 0.020705809 0.008610858698 -0.0006079885329 0.05334989102 -0.08826538388 -0.1220401637 -0.1061870029 -0.1153525799 0.03880508665 0.01254744795 0.01395685845 0.008349914642 -0.07977004644 -0.0802978289 -0.081707965 -0.05494664915 0.996131913 0.09353026643 0.1273207556 0.1854716052 0.1407099475 0.1311121232 0.02576215889 -0.02443559197 -0.01746198838 -0.09507639653 -0.08907466039 -0.1056852175 -0.09261923841 -0.09680308867 -0.03837912202 -0.02560527113 0.1360954198 0.319151116 0.3106479489 0.2724711344 0.3491289758 0.07746810174 -0.03377044804 -0.08045551369 -0.01382989008 -0.08299218591 -0.08274660624 -0.09671874463 -0.08821616445 -0.08470272735 -0.08971173766 0.06556559782 0.05221083868 -0.1089569539 -0.1060354004 -0.1280239853 -0.1150597428 -0.1251115148 -0.05313384312 -0.06193675855 -0.08908362505 -0.04560487407 -0.07800874299 -0.09035922731 -0.08582714386 -0.08200997548 -0.02940790922 -0.1115349711 -0.09821805276 -0.09773583618 -0.08062507181 -0.0867077646 -0.09105023349 -0.08234598162 -0.06966031808 0.06512355875 0.04479104274 0.0404468598 -0.007580163323 0.02156358512 0.04310790926 -0.01484996229 0.0522996449 0.02797007706 -0.02535570298 0.04784481484 -0.003599087708 -0.09259125842 0.075178928 0.05852264304 0.08172040747 0.08308399331 0.05518223349 0.01011401362 -0.004061363503 -0.03526239597 -0.04032815983 0.0184127805 0.0755707846 0.02853869169 --0.02816184837 -0.02222542289 -0.08438618072 -0.03577650118 -0.08758086469 0.06443405368 0.09591898835 -0.02240227919 -0.04334574181 0.1112020994 -0.09440882967 -0.04190819356 -0.09303807389 -0.01518169489 -0.09564243232 -0.08426128669 -0.06004118342 -0.04585636309 -0.07337715799 0.2834441204 0.1143436239 0.02806531755 0.1392153417 0.1452980738 0.0227296737 0.03612673777 0.0442035027 0.104676115 -0.07453620626 -0.1085662542 -0.1154565912 -0.1190106462 0.05234968938 0.02153258829 0.02338137835 0.02621899303 -0.08136271334 -0.07797426119 -0.09724862316 -0.08419627831 0.09353026643 1.020255777 0.1767969126 0.2084869337 0.1425682017 0.1210650414 -0.01768038249 -0.01075220667 -0.01523276445 -0.09340816491 -0.06750739913 -0.1022705233 -0.07512181176 -0.06681824038 -0.03126963351 -0.02495879857 0.1517805417 0.09595665822 0.1024838401 0.1175132054 0.1274107788 0.04226439629 -0.047753573 -0.06653942299 -0.007533976787 -0.07122657564 -0.07157729803 -0.06647554294 -0.05728176116 -0.08282043164 -0.09427930682 0.08226398155 0.08406563617 -0.1044109373 -0.09254715363 -0.1024688117 -0.09470030557 -0.1028190444 -0.06801545187 -0.07176123082 -0.0917449782 -0.04843242647 -0.05179034464 -0.0973667827 -0.08311070093 -0.04181983598 -0.02985614895 -0.1049384361 -0.1004463001 -0.08921055767 -0.09346126129 -0.09895391957 -0.07072250246 -0.08718667037 -0.08716254055 0.05744850346 0.06138470769 0.05871890742 -0.01632176763 0.0455066389 0.05811664903 -0.02332455082 0.03894074177 0.03622280525 -0.02932194031 0.02369533133 -0.03300126651 -0.1046889968 0.09603178737 0.1264230403 0.06856666124 0.09946473728 0.1204603283 -0.01730181987 -0.01257353852 -0.0308138037 -0.04572109028 0.04533555077 0.08869426362 -0.02214456372 -0.00636448257 0.009760790307 -0.08142299769 -0.02317630894 -0.08967020248 0.02870299872 0.05022833088 -0.009330241327 -0.08443857724 0.04817068879 -0.1026384676 -0.08115704273 -0.09686472419 0.01553332056 -0.1045974848 -0.09598001544 -0.06458928058 -0.06065753097 -0.07343197571 0.1298638304 0.1221741045 0.03612458908 0.1024532508 0.08983239947 0.0617952821 0.05901964191 0.05982610931 0.1382212542 -0.08174370125 -0.1070032098 -0.1228472952 -0.1221997119 0.01945716219 0.01201118805 0.008449669936 -0.006151922768 -0.08006440588 -0.08364127223 -0.1077731499 -0.1016215304 0.1273207556 0.1767969126 1.034338673 0.5780803037 0.1262831054 0.1561241508 -0.009861378705 0.008407946056 -0.006674124378 -0.07299643255 -0.08030261599 -0.09913370535 -0.08180004436 -0.07505088151 -0.02227071281 -0.01626401136 0.1973825404 0.1495727157 0.1181972217 0.1186314966 0.09903247327 0.02072665362 -0.02904915259 -0.08832206237 -0.01173731467 -0.09955605451 -0.1080746282 -0.1040843903 -0.0851267007 -0.07541792723 -0.08349724807 0.05908975583 0.1031380859 -0.1397347292 -0.1277829514 -0.1360416658 -0.1502762864 -0.1344201402 -0.08196823352 -0.07872361871 -0.1070312728 -0.04287990195 -0.05283423044 -0.1044560852 -0.09645953472 -0.06790618309 -0.01500617579 -0.1270065257 -0.09474913154 -0.1093387248 -0.124812544 -0.1088069021 -0.1119541788 -0.07284501324 -0.07211854313 0.116538594 0.06032770345 0.1073979468 0.002234734049 0.04833819674 0.08742684119 0.003587833167 0.08733094303 0.01700049434 -0.03731055655 0.04924764319 -0.008925969106 -0.08931845841 0.1313777442 0.1529808705 0.07024321521 0.06444820574 0.05857214078 -0.00739551521 -0.00695484463 -0.01203585351 -0.03487364355 0.04715609989 0.08745213023 0.02141462767 --0.01567310602 -0.006791943672 -0.09016301412 -0.03202088223 -0.09212971914 0.02780722644 0.07255761975 -0.01356541509 -0.08411128289 0.08040728526 -0.09051554889 -0.09221633849 -0.09157431287 -0.00377475073 -0.08726980893 -0.1166811135 -0.07484740226 -0.06627772601 -0.08319305213 0.1365795868 0.0639163037 0.03555458719 0.1285826892 0.09720938821 0.07056983647 0.06854510518 0.07554518469 0.1268853018 -0.08442993096 -0.1092161692 -0.1304914024 -0.1260905376 0.08266137535 0.04004922867 0.0399432924 0.02408271845 -0.06862871802 -0.07886132763 -0.09855659659 -0.07615400511 0.1854716052 0.2084869337 0.5780803037 1.051458576 0.127777497 0.1488331175 -0.02626590796 -0.01483864403 -0.0262101078 -0.06996633876 -0.08294108063 -0.1086327733 -0.09499821707 -0.09170404942 -0.03033761836 -0.02549732117 0.2001275242 0.09950367471 0.09919380169 0.0830860037 0.09386199811 0.0179320805 -0.03439930869 -0.08418338949 -0.018905005 -0.08665097993 -0.09507136991 -0.1035949249 -0.08545894893 -0.07777992581 -0.08720691431 0.07043411309 0.0745544096 -0.137036471 -0.1315120598 -0.1350267256 -0.1297553282 -0.136108086 -0.08660072424 -0.07932476768 -0.1048522665 -0.05252525498 -0.08306432187 -0.09167230265 -0.08091223032 -0.07135020985 -0.03626187232 -0.1080917191 -0.08905900927 -0.1059207073 -0.09811311168 -0.08726379706 -0.09954017902 -0.07263384969 -0.07068662171 0.1379185833 0.05047002971 0.08148121981 -0.02292330625 0.03226369183 0.0808324163 -0.00218572309 0.08933494146 0.01083550225 -0.03258156572 0.06243762848 -0.02157829449 -0.09986134763 0.1407639907 0.1574461328 0.08977019743 0.09765274601 0.06593218795 -0.02735188368 -0.01668387088 -0.02798513695 -0.04310186459 0.02752536062 0.08792425004 0.01715429248 -0.002954200517 0.02930981348 -0.09812248482 -0.01097521378 -0.09393165541 0.0239502401 0.06721289558 -0.03674970685 -0.07138884085 0.06034275104 -0.1042178619 -0.08512673924 -0.1021538399 -0.006163136377 -0.09648006172 -0.09913362042 -0.07815668324 -0.08091382283 -0.08050687855 0.1770941682 0.1215139648 0.0219378908 0.08279867394 0.1548595031 0.04112824705 0.04670408282 0.05883960577 0.08733915022 -0.09111116866 -0.1059694408 -0.09862659713 -0.1173629738 0.04852935095 0.0376819502 0.0392604148 0.0440048953 -0.08715968898 -0.08531765363 -0.09423306828 -0.08855134965 0.1407099475 0.1425682017 0.1262831054 0.127777497 0.997015361 0.48284471 0.01066355517 0.01330594796 0.008750063766 -0.07218536252 -0.07361295386 -0.1075019831 -0.09463952963 -0.08412991399 -0.03646852325 -0.01749780728 0.1734655174 0.1068709607 0.125649727 0.09891670164 0.09580792746 0.04409656425 -0.0135152696 -0.07836850126 -0.02020012441 -0.09502684133 -0.08905490152 -0.09887123467 -0.09156467009 -0.1030482288 -0.09257554837 0.08295207693 0.06919807202 -0.1109142643 -0.0951610037 -0.1112780573 -0.1282570496 -0.1174695914 -0.06180728347 -0.08653397279 -0.1060082956 -0.05192596285 -0.07416415164 -0.08576845966 -0.08935379381 -0.07513183754 -0.02236367245 -0.09685525505 -0.1020911498 -0.114506689 -0.093559331 -0.1071772303 -0.1129959092 -0.09320779381 -0.07806642183 0.07224265918 0.05417364536 0.02865900835 0.004819274885 -0.02083388167 0.05741986639 -0.01950332936 0.05591507905 0.01568838683 -0.02237707669 0.2270867991 -0.01021055162 -0.1016157026 0.1021170798 0.1265352 0.1092437134 0.1633545068 0.1250947354 -0.001803379292 -0.01797036509 -0.01943308406 -0.0257207889 -0.02178522278 0.1377723407 -0.01599559234 -0.007852506708 0.0260307418 -0.09958069773 -0.02838807359 -0.09724815355 0.02423119562 0.06275084256 -0.02413111127 -0.07219514559 0.05034362852 -0.09461253685 -0.08905384255 -0.08360281568 0.002979445597 -0.09170822857 -0.1132882455 -0.07462008369 -0.06594695106 -0.07192786527 0.1383102976 0.1052002695 0.02673489115 0.1068793701 0.1879726806 0.03273396264 0.03489707264 0.0324099669 0.1095532049 -0.1042837452 -0.1314815013 -0.1259102257 -0.1331568792 0.06055253202 0.03467327592 0.03450038767 0.02584801623 -0.1063988336 -0.1105568717 -0.1192187799 -0.1069280195 0.1311121232 0.1210650414 0.1561241508 0.1488331175 0.48284471 1.017826117 0.03483297402 0.03316814659 0.04153907434 -0.06654655595 -0.08214615417 -0.107518221 -0.1021959572 -0.09895084015 -0.0252582613 -0.01332790744 0.2091439058 0.1090905371 0.122415309 0.1039727232 0.1121453239 0.01700272113 -0.0009512906611 -0.09225183243 -0.01036340259 -0.0942786259 -0.08355956076 -0.08726036929 -0.09191885486 -0.08525986453 -0.08102235464 0.03019808185 0.07411983806 -0.1221108341 -0.1112641638 -0.136673702 -0.1424767161 -0.1278821383 -0.04999192069 -0.07938365847 -0.09250527544 -0.02688649141 -0.04637680731 -0.08447186846 -0.09613478534 -0.07113962955 -0.01145363331 -0.1161392059 -0.09948321373 -0.1256175869 -0.1029981506 -0.1046548722 -0.1167057373 -0.09582465801 -0.08614905174 0.06503776814 0.05525137925 0.05148086519 0.02079835961 -0.01022659746 0.05042274837 -0.04104000551 0.05107794598 -0.004612882013 -0.03453164387 0.2220877693 -0.007687388414 -0.09225556391 0.158386864 0.136561166 0.09866165936 0.1314893083 0.1207030897 0.003256813286 -0.01810411268 -0.01446913269 -0.02558481803 -0.00950484794 0.1646585049 -0.008372672196 -0.2629541268 0.2702302167 -0.1520630887 0.2407238211 -0.1170954743 -0.0946940218 -0.1043063217 0.2226453687 -0.1267014624 -0.1174328735 -0.1313587895 -0.1289351835 -0.1422610667 0.4568430363 -0.1322463987 -0.1497132083 -0.1641965849 -0.1512086793 -0.1527809337 -0.005052138514 -0.008960498685 -0.02193214856 -0.009726337902 0.02562639764 -0.006435364233 -0.03928532671 -0.02357569296 0.003822791926 -0.1534387527 -0.1590871102 -0.1598010859 -0.1617887013 -0.1249266617 -0.134038731 -0.1349224654 -0.1288718822 -0.1640476447 -0.1498538948 -0.1462279701 -0.1372559242 0.02576215889 -0.01768038249 -0.009861378705 -0.02626590796 0.01066355517 0.03483297402 1.217851767 0.6188436832 0.6628293357 -0.1123485076 -0.1305945815 -0.1699125201 -0.1660201889 -0.1467114454 0.2994098386 0.3278824191 0.09716973934 0.0001769431829 -0.009405188668 -0.003470435973 0.004845441452 0.01709949863 0.2824512142 -0.1294308023 0.2574442617 -0.1388657455 -0.1478246907 -0.1316586246 -0.1524162059 -0.1609116267 -0.1416334586 -0.1219524504 -0.1270135522 -0.1415201381 -0.1594782639 -0.1461156406 -0.1511467418 -0.1597167604 0.2088730199 -0.1261273485 -0.1512565522 0.1845168792 0.2157520056 -0.1569739779 -0.1468542911 -0.1307156773 0.238744935 -0.1582955234 -0.137275277 -0.145759132 -0.1398329707 -0.1462368258 -0.156126063 -0.1259911452 -0.147059995 0.0213624907 -0.02317590343 0.118192676 0.3697678332 0.07612742392 0.0003527019401 0.03986421747 -0.004873155256 0.04118588081 0.057073326 -0.003719146755 0.4124955949 -0.1445107503 -0.02772473235 -0.02462179621 0.005204318063 -0.009847331409 0.0108948539 0.2851480709 0.2881704158 0.2623402716 0.1238113437 0.07585863837 0.001655785728 0.26565398 -0.2535020191 0.2599955272 -0.1398320472 0.2249939719 -0.1349347246 -0.09252295164 -0.1078843972 0.2441384819 -0.1089958539 -0.1175251715 -0.1428717546 -0.1274684456 -0.1441448982 0.3979208252 -0.1322457119 -0.1437804436 -0.139739681 -0.1504543484 -0.1463107838 -0.01084780805 -0.002627407117 -0.01913683545 -0.00156467391 0.01483847695 -0.01499246438 -0.03717843261 -0.02147303651 0.003962648263 -0.1491880461 -0.1433819296 -0.1478355098 -0.1624729944 -0.1090188602 -0.1238476313 -0.1236779334 -0.1181843916 -0.1483172308 -0.1587251095 -0.1496987854 -0.1432225336 -0.02443559197 -0.01075220667 0.008407946056 -0.01483864403 0.01330594796 0.03316814659 0.6188436832 1.18110301 0.7256651935 -0.09292844609 -0.1193302499 -0.1570717732 -0.1518497502 -0.1212733471 0.2522792512 0.2784143939 0.08651549686 -0.022295025 -0.01801678201 -0.02583256808 0.001872372428 0.002310119725 0.2753977124 -0.1215184512 0.2551223888 -0.1355187825 -0.1304008772 -0.1264499901 -0.1367744557 -0.1475642875 -0.1401276246 -0.1160115183 -0.1192100078 -0.1403789247 -0.1558363469 -0.1315666856 -0.1308434649 -0.1414322758 0.2095182598 -0.1584416794 -0.1308732309 0.2517859963 0.2421066446 -0.1331377061 -0.1373573589 -0.110440449 0.2216910504 -0.1344417276 -0.1322421854 -0.1351927225 -0.1288740201 -0.1443680431 -0.1460661034 -0.1207882858 -0.1412625969 0.01121324279 -0.01384347288 0.09932387134 0.311109707 0.04928307629 -0.005423183615 0.02732129002 -0.0008577005418 0.08626225277 0.0621817079 -0.002412909102 0.3692528457 -0.140998684 -0.005808400059 -0.01191489056 -0.002408834849 -0.03221134585 -0.01209046026 0.2814805932 0.2802429592 0.2112272875 0.1036458177 0.05001368937 -0.001681553802 0.2300805436 -0.2619635718 0.2658134502 -0.1399275993 0.2273978629 -0.134282078 -0.1028070665 -0.104714188 0.21966216 -0.1144490856 -0.1202720385 -0.1453382689 -0.1402466187 -0.1408506779 0.4161051238 -0.1321212747 -0.1394351513 -0.1569001738 -0.1496983061 -0.142475426 -0.007031432677 -0.007718642983 -0.02233230211 -0.02136877888 0.01464609618 -0.01297177484 -0.03637933562 -0.01234194689 -0.001786801378 -0.1373755979 -0.1384149529 -0.1450727423 -0.1490940383 -0.1237719576 -0.1305949186 -0.131968645 -0.1255319196 -0.1472530906 -0.16135074 -0.1560414383 -0.1571973971 -0.01746198838 -0.01523276445 -0.006674124378 -0.0262101078 0.008750063766 0.04153907434 0.6628293357 0.7256651935 1.188785217 -0.1124967871 -0.1347092724 -0.1550455529 -0.1387390801 -0.1183037813 0.2654665099 0.2937571185 0.09125387546 -0.01363277613 -0.03031762096 -0.03328625835 -0.0016624974 0.003689178522 0.276596242 -0.1291567741 0.2582236772 -0.134831031 -0.1497340611 -0.1363030587 -0.1418698449 -0.1371868516 -0.1357434848 -0.1143090784 -0.1153631302 -0.1430903176 -0.1519823294 -0.1376409067 -0.1417759368 -0.1533592992 0.2049304647 -0.1551271234 -0.1308386735 0.232386493 0.259394159 -0.126375222 -0.1308159132 -0.1186025204 0.2318279326 -0.1294970426 -0.1206157682 -0.1499504514 -0.1315202122 -0.1400317618 -0.1459340523 -0.1278491642 -0.1369152748 -0.01066911528 -0.008330677398 0.1099200134 0.3573765555 0.04555498543 -0.01430218157 0.01347356723 -0.01483375897 0.05003814005 0.07875805794 -0.004287002188 0.4064736732 -0.1357474703 -0.008187609534 -0.02106172162 0.006094641103 -0.01518476977 0.007856006112 0.2789812158 0.2695326116 0.2085810085 0.1032253622 0.04774940373 0.008656397877 0.2489581696 --0.1127500184 -0.1142687284 0.06463198095 -0.1316066099 0.07886095945 -0.0131686846 -0.0132586161 -0.1290863601 0.137902919 -0.02155578952 0.05842698653 0.1260642463 -0.0001547382915 -0.1053062367 0.1244574824 0.07053008143 0.08080969502 0.110533922 0.1082690412 -0.07680530363 -0.05279890358 -0.04846698956 -0.06073941288 -0.05408995644 -0.04065959934 -0.04210977716 -0.04900477906 -0.07120512795 0.0882120287 0.1230980017 0.0983624476 0.1634780389 -0.01999475329 -0.01966867506 -0.0189635317 -0.01806423145 0.05043398858 0.03601184125 0.03915789157 0.02835317753 -0.09507639653 -0.09340816491 -0.07299643255 -0.06996633876 -0.07218536252 -0.06654655595 -0.1123485076 -0.09292844609 -0.1124967871 0.9198476454 0.396284766 0.1013821958 0.05620986664 0.07773410356 -0.1334014702 -0.1194400714 -0.1272715361 -0.08180240788 -0.09919734534 -0.09531239916 -0.07468464376 -0.08142773309 -0.1217738746 0.1135260095 -0.117738618 0.1297622692 0.1281583485 0.08375960333 0.1025696182 0.03479250218 0.06654633598 -0.01047379572 -0.02498109907 0.1034859366 0.07610114484 0.09612846762 0.09863659894 0.1017345501 -0.05901365398 0.06816211616 0.04818131753 -0.04675663703 -0.02127829889 0.086070062 0.08803878333 0.01865054626 -0.1244974573 0.1232317769 0.1287064176 0.04201496239 0.05252059966 0.01876859042 0.02579264383 0.0724792312 0.07770528465 -0.08019594369 -0.08389908116 -0.06340947935 -0.11958242 -0.06327016451 -0.08081790097 -0.01094522118 -0.07453475333 -0.06459192734 -0.01882967401 -0.02019201137 -0.122012705 0.05722177886 -0.06368198116 -0.05919434186 -0.0897727362 -0.09267848593 -0.08390731006 -0.1326551015 -0.1256731701 -0.1222392752 -0.001868935106 -0.06034479385 -0.09158688769 -0.1151836459 --0.1183937299 -0.1168334994 0.07637231184 -0.1269593014 0.05289462082 0.01317139383 -0.009490971911 -0.1207333104 0.09842587688 -0.006393251304 0.05664259992 0.1047521328 0.04622543406 -0.1111167736 0.07938065001 0.1345143693 0.08605818053 0.1016495307 0.09665881734 -0.06713084577 -0.0379514037 -0.04666982742 -0.06046653216 -0.0789150912 -0.0421332307 -0.03593267994 -0.05429297844 -0.06867688766 0.05348491919 0.129186639 0.1240710646 0.126628684 -0.04068507388 -0.0300369061 -0.03088277764 -0.02085275288 0.05129156525 0.03314212025 0.04251955423 0.02455221603 -0.08907466039 -0.06750739913 -0.08030261599 -0.08294108063 -0.07361295386 -0.08214615417 -0.1305945815 -0.1193302499 -0.1347092724 0.396284766 0.8338091721 0.1388251356 0.1213006497 0.1097330732 -0.1410901403 -0.1407575543 -0.1370400594 -0.07346159002 -0.08662118207 -0.07676656388 -0.07124204856 -0.07745544936 -0.1421685491 0.1247451145 -0.1101839548 0.1613187881 0.1282590943 0.07940026375 0.1030996856 0.03974932872 0.04957765482 -0.004079384898 0.009393524843 0.1011940012 0.1012183036 0.0946289299 0.1351619926 0.1107678005 -0.0482516627 0.0679274643 0.06499558436 -0.03784480228 -0.02804476571 0.1331019721 0.09557233778 0.05687639729 -0.1355887885 0.08945765018 0.1153199935 0.05454891204 0.05614111708 0.04132148169 0.05897316203 0.08175199833 0.07141224722 -0.0845460629 -0.08314590707 -0.09645425141 -0.1293503655 -0.06015321496 -0.0815434472 -0.03851045356 -0.08549267481 -0.05233892526 -0.01587465588 -0.02965447194 -0.1249660467 0.05072412362 -0.07043988046 -0.06619798259 -0.07633685615 -0.1163952973 -0.09802135972 -0.1515125928 -0.1442054553 -0.1129826742 -0.01517880956 -0.0586483412 -0.1031176942 -0.1177836912 --0.1342968865 -0.1260053459 0.0632923034 -0.1139431314 0.1031621106 -0.03426274443 -0.04068472122 -0.1215985334 0.05133942322 -0.003454271625 0.1201831548 0.06598617602 0.09426935603 -0.1325556909 0.1352504464 0.05868278649 0.07967526742 0.09289512508 0.08040862585 -0.08093873789 -0.09091079211 -0.06422690295 -0.1013899823 -0.1069770181 -0.08841718676 -0.06660018299 -0.06554800953 -0.103014125 0.07612438952 0.07122440984 0.08322593621 0.06718223788 -0.03420485174 -0.009931052266 -0.01206759682 0.01018106282 0.04745737363 0.06865535985 0.08913512672 0.04833031057 -0.1056852175 -0.1022705233 -0.09913370535 -0.1086327733 -0.1075019831 -0.107518221 -0.1699125201 -0.1570717732 -0.1550455529 0.1013821958 0.1388251356 0.8940102739 0.4343225615 0.4393657481 -0.148164135 -0.1542338561 -0.1496445516 -0.09141740448 -0.09517067759 -0.08409834389 -0.0900695403 -0.095940575 -0.1422092446 0.1283108827 -0.1355182053 0.15528486 0.07936530443 0.08759447156 0.0944984183 0.08158334551 0.08923364205 -0.01460525295 -0.01753812998 0.05689698829 0.07167873692 0.08058562762 0.05328331553 0.05858982681 -0.05314888837 0.1106934927 0.08799703344 -0.0323583989 -0.03643339104 0.2871330627 0.268222176 0.07277438009 -0.1593270282 0.134739193 0.1248509825 0.07351068404 0.0604850374 0.04779984667 0.0679185286 0.08525898452 0.08167735305 -0.09164548334 -0.108872816 -0.1124450247 -0.1393130621 -0.08746565308 -0.1002748856 -0.06674482362 -0.1073601081 -0.09302703606 0.1425092648 -0.04809576106 -0.1397742619 0.0621893567 -0.08877875493 -0.07181626373 -0.1177716296 -0.07890920071 -0.08005087938 -0.1216171092 -0.1255065165 -0.1467594381 0.1064132721 -0.08780015374 -0.07896871757 -0.1289697293 --0.1281712458 -0.1304877194 0.06861627283 -0.1113998089 0.04693728964 -0.01807261437 -0.04076947099 -0.1030649397 0.06435497502 -0.000283261202 0.06759416265 0.05356444081 0.1073773037 -0.1114511971 0.09869580606 0.08727152934 0.05654697754 0.05556953772 0.06506353672 -0.09065324221 -0.07243657039 -0.05317100184 -0.07041994841 -0.07064078122 -0.06092142139 -0.04605005485 -0.03660933918 -0.08912251593 0.05974872737 0.05134485784 0.06603958015 0.06504304265 -0.02900303217 -0.02086356008 -0.01978161004 -0.005620081855 0.02573410247 0.04619517123 0.08529856328 0.03538728891 -0.09261923841 -0.07512181176 -0.08180004436 -0.09499821707 -0.09463952963 -0.1021959572 -0.1660201889 -0.1518497502 -0.1387390801 0.05620986664 0.1213006497 0.4343225615 0.8763563991 0.4095256168 -0.1414277415 -0.1467846858 -0.1267405074 -0.09457786051 -0.09661667638 -0.07849257903 -0.0696112784 -0.06328607106 -0.1364484319 0.1124855661 -0.1306292032 0.1139006459 0.06994804506 0.0852663763 0.08140201843 0.1035151212 0.1162701251 -0.01766130347 -0.00304886689 0.04154947114 0.09792323682 0.09355104228 0.05483551328 0.05539841375 -0.02659767762 0.09165024498 0.08470041835 -0.04231906662 -0.02041546821 0.2370296687 0.2100584054 0.06305920355 -0.1443346558 0.1008036422 0.07539557874 0.0710218317 0.05186562876 0.05362623622 0.05683483932 0.03739060479 0.0882002242 -0.08408169413 -0.08474566165 -0.105411684 -0.1221609499 -0.06435646899 -0.09411131555 -0.05701831694 -0.09326707189 -0.08142695341 0.06964080166 -0.02404671717 -0.1164954687 0.07510815942 -0.08425092019 -0.08475576561 -0.09137056839 -0.06955111439 -0.07230179702 -0.1263434821 -0.1209638153 -0.1252307676 0.1116770524 -0.06127524917 -0.08155993539 -0.1175113498 --0.111783251 -0.1133577104 0.07262697368 -0.08464892782 0.08166627912 -0.02252543084 -0.02593882252 -0.09843314614 0.04324172434 -0.02930262411 0.0926577183 0.02323105396 0.06372072771 -0.1067702841 0.08528104226 0.04750939698 0.05019234764 0.05218153953 0.04850659353 -0.07993864785 -0.07939326149 -0.05294439548 -0.08750542521 -0.08403555611 -0.0734285781 -0.05100029269 -0.04277262707 -0.0827830032 0.0398572522 0.03498295864 0.05179811682 0.05641465184 -0.02175486436 -0.02684950098 -0.02774594149 -0.01858336709 0.03001466194 0.06185160796 0.08081241219 0.03863790447 -0.09680308867 -0.06681824038 -0.07505088151 -0.09170404942 -0.08412991399 -0.09895084015 -0.1467114454 -0.1212733471 -0.1183037813 0.07773410356 0.1097330732 0.4393657481 0.4095256168 0.8775187223 -0.1271264776 -0.1387290735 -0.1201214668 -0.08912849584 -0.091095866 -0.09463789281 -0.06589647247 -0.06502858852 -0.1173307161 0.1371212389 -0.1155681585 0.144350905 0.06777003142 0.05629991368 0.07778732778 0.0756409708 0.07036921308 -0.01091626288 -0.02153858438 0.05981113399 0.05593853586 0.069918828 0.06518273677 0.0758928821 -0.04788671534 0.09491974893 0.08616985699 -0.03514859413 -0.03382495022 0.2880351648 0.2412688774 0.05513241107 -0.1396775956 0.09125146998 0.0815116744 0.02045871676 0.0212046183 0.02833259561 0.02981566382 0.04687903052 0.08710234197 -0.07288395378 -0.0657034085 -0.08597430195 -0.1183837878 -0.05695940174 -0.08311764971 -0.06782354055 -0.08545326858 -0.06929291018 0.1121189836 -0.04422903241 -0.1076477617 0.04477729527 -0.07745672841 -0.07370945768 -0.1026770354 -0.07892694537 -0.07531024471 -0.09953291599 -0.1192780166 -0.1169684851 0.09872552078 -0.0545621364 -0.05569462953 -0.1063671458 -0.2634320558 0.272426602 -0.1159039171 0.3353205977 -0.1340282581 -0.1163480122 -0.118172058 0.3938098568 -0.1209584659 -0.111242089 -0.1348317998 -0.1319109221 -0.1183646425 0.1989462756 -0.1541563316 -0.1544600303 -0.1451613034 -0.1426079339 -0.1442411931 -0.02934422423 -0.006904438935 -0.01639198502 -0.009289998822 -0.02906394948 -0.008736493306 -0.005436620684 -0.007484812012 -0.001814347026 -0.1312241491 -0.1407681577 -0.1394206948 -0.15903006 -0.1179876451 -0.1259856631 -0.124461706 -0.1289809688 -0.1087568908 -0.1295610278 -0.127169138 -0.1246353998 -0.03837912202 -0.03126963351 -0.02227071281 -0.03033761836 -0.03646852325 -0.0252582613 0.2994098386 0.2522792512 0.2654665099 -0.1334014702 -0.1410901403 -0.148164135 -0.1414277415 -0.1271264776 1.130989246 0.567120137 0.05590488338 -0.03425265247 -0.03167447725 -0.03836500644 -0.02175659429 0.016911848 0.6104246087 -0.1085385357 0.3934782923 -0.1254871396 -0.1502752153 -0.1461844426 -0.1501071635 -0.1093235337 -0.12612328 -0.1108739615 -0.1139917114 -0.1418150997 -0.159322642 -0.1351680569 -0.1501718577 -0.1403893749 0.06713536463 -0.1523883947 -0.1290939962 0.05715898586 0.03351767552 -0.1493881023 -0.1579725422 -0.1148272142 0.5938955473 -0.1423193168 -0.1431803596 -0.114689915 -0.1166451142 -0.1358777077 -0.1268317776 -0.1273520199 -0.1324701158 0.02039088987 -0.003595088948 0.1364596711 0.2959066428 0.098660662 0.01402391407 0.04300798875 0.01458884008 0.03691009185 0.05180465499 -0.03990594394 0.2323632678 -0.1180654279 -0.00663601 -0.01052777232 0.003724280041 -0.0323687769 -0.02350951192 0.3337612752 0.3801336486 0.5202083499 0.06811452263 0.09846130186 -0.03558746764 0.2409349061 -0.2671426778 0.2202853367 -0.1480072136 0.33932184 -0.1360664597 -0.09989755118 -0.106898236 0.4002998176 -0.1085579954 -0.1183613586 -0.1449491737 -0.1245539629 -0.1294461978 0.2239380913 -0.1519729076 -0.1446847228 -0.1583064639 -0.1491962092 -0.1621045194 -0.02057315932 0.0007140924414 -0.006371862798 0.005080839241 0.005834175748 -0.02195621665 -0.009511673214 -0.01914084737 0.007993786251 -0.1333221585 -0.146865743 -0.1431714348 -0.1273540306 -0.1144686361 -0.1149445691 -0.1145853863 -0.1121513679 -0.1292100896 -0.1457646317 -0.1434504341 -0.1479181402 -0.02560527113 -0.02495879857 -0.01626401136 -0.02549732117 -0.01749780728 -0.01332790744 0.3278824191 0.2784143939 0.2937571185 -0.1194400714 -0.1407575543 -0.1542338561 -0.1467846858 -0.1387290735 0.567120137 1.136365567 0.08961851048 -0.03094067912 -0.0208030725 -0.02345930255 -0.01305024238 0.006012687656 0.6117702828 -0.1189661396 0.3550490291 -0.1362429906 -0.1466177303 -0.1288835316 -0.1369320495 -0.1421418074 -0.131226683 -0.1006405068 -0.1034549201 -0.139515061 -0.1386702977 -0.1227277939 -0.1463440903 -0.138154148 0.04720503405 -0.1391397171 -0.1437711565 0.02316352388 0.04385199011 -0.1613758922 -0.1622121325 -0.1184265023 0.5532423065 -0.1356957152 -0.1406485355 -0.1457244147 -0.1246789453 -0.157395867 -0.1528882099 -0.1300976007 -0.1225959664 -0.00483812705 -0.02041962581 0.2041391385 0.32593792 0.1262479645 0.001886871056 0.03728922621 0.002906229554 0.03142494704 0.02781101626 -0.02782594084 0.2347857609 -0.1436907763 -0.004328226003 -0.00377516377 0.002552562488 -0.03448068547 -0.02424423372 0.370184242 0.3617180858 0.390262839 0.09475544679 0.1278702016 -0.0195898851 0.2496379686 -0.09407850676 0.09758654944 -0.1355082349 0.08757227447 -0.1290803812 -0.09608653649 -0.08362356589 0.07827921116 -0.1300613861 -0.1077992788 -0.1462549456 -0.1276685317 -0.133770238 0.09088856286 -0.1433982667 -0.1585921868 -0.1455647607 -0.1322582947 -0.141255087 0.1637444639 0.1566581234 0.1439376245 0.1921435711 0.3192558146 0.0838355291 0.1613212746 0.1583371199 0.08493126174 -0.1271446297 -0.1514587316 -0.1552118961 -0.1563094733 -0.09665456584 -0.1042643233 -0.102206215 -0.09659736504 -0.1373201772 -0.1288668632 -0.1537337744 -0.1515919742 0.1360954198 0.1517805417 0.1973825404 0.2001275242 0.1734655174 0.2091439058 0.09716973934 0.08651549686 0.09125387546 -0.1272715361 -0.1370400594 -0.1496445516 -0.1267405074 -0.1201214668 0.05590488338 0.08961851048 1.140545363 0.1644583249 0.1242616839 0.1331350683 0.1716498527 0.08515866559 0.09971950462 -0.143203333 0.09166352048 -0.1570241352 -0.1437077888 -0.142042321 -0.1511112128 -0.1325170903 -0.1343416529 -0.09672023764 -0.09675521654 -0.1651957606 -0.1669787199 -0.1553777615 -0.1615574798 -0.1633113212 -0.03464821107 -0.1464897971 -0.1474392467 -0.01028795383 -0.03906753165 -0.1564936535 -0.1413876757 -0.1195115985 0.07928755333 -0.1526356069 -0.1421101993 -0.1480433766 -0.143672986 -0.1455770357 -0.1499404557 -0.1364940048 -0.145309553 0.1564749722 0.1354919103 0.2859411628 0.1112185194 -0.01721331724 0.1461136128 0.01304518184 0.1419250728 0.0135314328 -0.01852751793 0.1683144983 0.08679037696 -0.1385887474 0.1544306089 0.1617305007 0.1691350438 0.2011300099 0.1856992198 0.09940072822 0.09384574367 0.06321916555 -0.002973806793 -0.02246711097 0.2200034878 0.1034745945 -0.01056475177 0.01354699067 -0.10061211 -0.02720645435 -0.1026152295 0.08852581859 0.0925289249 0.01031953697 -0.07923212977 0.01791097555 -0.111560989 -0.08507815482 -0.07042956983 -0.01855640288 -0.1059406725 -0.09694458247 -0.06889300169 -0.08477883331 -0.07168229073 0.1661199747 0.1745928013 0.1005629675 0.1208187857 0.07938030497 0.000289194351 -0.01422181542 -0.005842279246 0.07319431004 -0.08215486337 -0.1060879895 -0.09342452631 -0.1254948808 -0.01885230842 -0.009149114165 -0.008793363315 -0.02112532065 -0.09690443376 -0.1136105345 -0.1269803063 -0.1002142067 0.319151116 0.09595665822 0.1495727157 0.09950367471 0.1068709607 0.1090905371 0.0001769431829 -0.022295025 -0.01363277613 -0.08180240788 -0.07346159002 -0.09141740448 -0.09457786051 -0.08912849584 -0.03425265247 -0.03094067912 0.1644583249 1.034116017 0.5321851931 0.48836821 0.3344212328 0.06214285821 -0.02923724086 -0.07745022144 0.008093118805 -0.08042930458 -0.1069507477 -0.1081625121 -0.1130201853 -0.0934440657 -0.09658677888 -0.02298555151 -0.001068117109 -0.1141025324 -0.1211180188 -0.109086104 -0.1161676749 -0.1270908675 -0.05450091403 -0.09973830508 -0.1133789061 -0.03892136782 -0.06209751887 -0.08964477107 -0.08101444795 -0.08676242669 -0.01948409016 -0.114829595 -0.112964512 -0.1278387823 -0.1106642371 -0.1025071186 -0.1023016078 -0.07864385134 -0.0492803251 0.002058881926 0.07390669709 0.05964103876 0.008787990108 0.06350663749 0.04315377291 0.006362654272 0.0537200914 0.07378460664 -0.02770572655 0.05290605921 0.005182329331 -0.09537399339 0.06611019854 0.06139772729 0.04858943452 0.08682242743 0.1042220239 -0.007255240308 -0.007536143731 -0.02233316498 -0.02992901358 0.06181086412 0.1046885791 0.0003863253244 -0.007841136654 0.0242788636 -0.102544189 -0.00738757141 -0.0971648077 0.04824709336 0.08229637854 -0.0004017091325 -0.08186636082 0.05284335645 -0.1170311043 -0.08976715721 -0.06518239788 -0.008085423856 -0.09918757081 -0.1061918846 -0.08694469263 -0.0947464764 -0.08989058469 0.1497956801 0.166420574 0.1395334534 0.1384906853 0.09233313622 0.01680487817 -0.001815927928 0.00386931367 0.07108182587 -0.09717186247 -0.1230637152 -0.1032194174 -0.1241129144 0.00947761322 0.008053980435 0.0095172181 -0.01152747019 -0.08226449607 -0.09332798491 -0.1188246685 -0.09744524463 0.3106479489 0.1024838401 0.1181972217 0.09919380169 0.125649727 0.122415309 -0.009405188668 -0.01801678201 -0.03031762096 -0.09919734534 -0.08662118207 -0.09517067759 -0.09661667638 -0.091095866 -0.03167447725 -0.0208030725 0.1242616839 0.5321851931 1.026188092 0.4782265156 0.3098924969 0.09165066316 -0.01891322292 -0.09843746229 0.007484913553 -0.09177407439 -0.1059446322 -0.09993209579 -0.1117962019 -0.0920704702 -0.1019677055 -0.02397340594 0.01706046121 -0.1269392662 -0.1033173591 -0.1118716966 -0.1270479903 -0.119626227 -0.04865785281 -0.08393564358 -0.1092906448 -0.0381267221 -0.06287547993 -0.09866379823 -0.08577248315 -0.08038604592 -0.01775061188 -0.1137656071 -0.1019964347 -0.1148476745 -0.1035726732 -0.1024893749 -0.09425733486 -0.08873027931 -0.070832425 0.0454249855 0.09432009339 0.0433069765 0.01548425534 0.03286635889 0.07304246049 0.003174686185 0.08120573517 0.05783364441 -0.04120691833 0.05406829121 -0.004323358046 -0.09250732162 0.05758219435 0.0420893256 0.05980272057 0.09204892458 0.08432276772 -0.0100972337 -0.002678823356 -0.0229940641 -0.04370148091 0.02979972789 0.09029822827 0.002062186328 --0.0008840727083 -0.001992617886 -0.10649342 -0.02186715041 -0.08936193057 0.07051182819 0.1112568206 0.01596613815 -0.06447314891 0.03059882702 -0.1005766045 -0.08288856103 -0.08267982786 -0.02101731215 -0.09953046275 -0.1060081249 -0.07640894819 -0.09424962539 -0.07014049073 0.1126806929 0.2115054659 0.1355607383 0.1139679296 0.08211776756 0.03100180315 0.0140443926 0.001987625956 0.05196428089 -0.09481442067 -0.1141261093 -0.09661568938 -0.1210368304 0.02628608823 -0.005041681986 -0.00393307825 -0.00866715038 -0.09618506258 -0.09701948966 -0.106142097 -0.09089662015 0.2724711344 0.1175132054 0.1186314966 0.0830860037 0.09891670164 0.1039727232 -0.003470435973 -0.02583256808 -0.03328625835 -0.09531239916 -0.07676656388 -0.08409834389 -0.07849257903 -0.09463789281 -0.03836500644 -0.02345930255 0.1331350683 0.48836821 0.4782265156 1.012488382 0.2917863431 0.07332838527 -0.02812281218 -0.07272168341 -0.01006964397 -0.07844690396 -0.0988774308 -0.09700922363 -0.08745234949 -0.1024948988 -0.1087352699 -0.01705388694 0.01372345534 -0.1143506919 -0.1091983495 -0.1100279114 -0.1246250957 -0.1131207492 -0.06245149562 -0.0861551622 -0.1068624187 -0.06191417033 -0.06368258287 -0.1067856369 -0.0880462353 -0.06636479603 -0.02711353223 -0.1047187996 -0.1012206393 -0.1093156371 -0.0972400279 -0.09986017776 -0.09350460425 -0.09855911092 -0.06890701427 0.04269196049 0.07650361072 0.04983696719 -0.0006148144639 0.03014837527 0.06160084473 0.01682405289 0.05778161421 0.05568917355 -0.01707405433 0.04002035276 -0.003229750576 -0.09404142614 0.07840611644 0.08074590922 0.06298295268 0.1001573035 0.08666558795 -0.01675195512 -0.01543458384 -0.002661400182 -0.02875618753 0.02872707663 0.1166407881 0.01982428187 -0.0221813105 0.03261840818 -0.09625377864 -0.01215626939 -0.095804062 0.01710907779 0.02934466163 0.02336266084 -0.06081614438 0.01960185814 -0.09337361743 -0.05842341874 -0.1055237143 0.004848345096 -0.0884863954 -0.0841764592 -0.0599792586 -0.06441992393 -0.07603471545 0.08242159779 0.1013163849 0.1226476826 0.09105858147 0.07364450036 0.02389495279 0.00523767549 0.01518435473 0.06211411405 -0.09018916901 -0.09934662875 -0.09394393835 -0.1147153419 0.01243211475 -0.003895688191 -0.002449547404 -0.003104070349 -0.08263688675 -0.07984386449 -0.08268095653 -0.07669321095 0.3491289758 0.1274107788 0.09903247327 0.09386199811 0.09580792746 0.1121453239 0.004845441452 0.001872372428 -0.0016624974 -0.07468464376 -0.07124204856 -0.0900695403 -0.0696112784 -0.06589647247 -0.02175659429 -0.01305024238 0.1716498527 0.3344212328 0.3098924969 0.2917863431 1.00100617 0.07971101201 -0.01272197099 -0.08224420992 -0.0117196256 -0.1008379378 -0.1027968565 -0.07430936711 -0.08490242559 -0.1012450887 -0.1055629641 0.0766898882 0.04836408776 -0.1080538627 -0.09915053528 -0.09561828899 -0.1024005902 -0.106970748 -0.04165787201 -0.1056118922 -0.1032647671 -0.04620939266 -0.05218402068 -0.1160561066 -0.09357869557 -0.0743112709 -0.03005532414 -0.1020407755 -0.09974053911 -0.09125249463 -0.08756889007 -0.10790692 -0.1039443954 -0.09225919769 -0.0752176319 0.04238848145 0.07186832453 0.0551108593 0.01449030231 0.02999167242 0.04535347597 -0.0179003408 0.03531465809 0.02469864651 -0.02642939331 0.06099286417 0.02010556798 -0.09659360438 0.06323371084 0.06290378848 0.07397263691 0.07231019778 0.0934242228 0.009182871086 -0.008392571318 -0.009440859966 -0.03306250322 0.02834560435 0.08067148573 0.01513028175 -0.008400687168 0.001978406233 -0.07490974172 0.01512870806 -0.08177313469 0.0005738205534 0.02085700148 0.002029736438 -0.07451682705 -0.02536123447 -0.08960526981 -0.06504759116 -0.0898254134 0.01088384001 -0.07334162157 -0.07305281988 -0.07044649789 -0.08719660744 -0.07031168255 0.006593018757 0.02704707002 0.0455406132 0.1021643065 0.04271226759 0.02672060821 0.003140950912 0.01194830232 0.2353277739 -0.07899782546 -0.1085726278 -0.1054463458 -0.09200380474 0.02337220174 -0.007204184633 -0.009890978042 -0.008870248714 -0.09336722938 -0.09496964992 -0.09503790382 -0.09360443603 0.07746810174 0.04226439629 0.02072665362 0.0179320805 0.04409656425 0.01700272113 0.01709949863 0.002310119725 0.003689178522 -0.08142773309 -0.07745544936 -0.095940575 -0.06328607106 -0.06502858852 0.016911848 0.006012687656 0.08515866559 0.06214285821 0.09165066316 0.07332838527 0.07971101201 1.085723309 0.02485403942 -0.07403825132 0.008992304568 -0.08707182804 -0.07052905431 -0.06478487305 -0.06751045349 -0.0865129833 -0.07675070703 0.0103782079 0.009509554525 -0.08837675638 -0.09452570429 -0.09450555347 -0.1038747278 -0.09307295901 -0.02468363142 -0.06949086459 -0.09506358848 -0.03744579076 -0.05325371247 -0.1100577276 -0.08426805538 -0.04471881993 0.0091758413 -0.09206399382 -0.09446772131 -0.07607463843 -0.07664477183 -0.08694743417 -0.09908410836 -0.09218946203 -0.07241944485 0.2213385297 0.2244182145 0.02839365598 0.02703983315 0.00913053103 0.2290180237 0.2403734238 0.2386878363 0.2420555181 -0.005846573511 0.00547586372 0.008738636001 -0.08048045697 0.01873709604 0.004840856028 0.2557804843 0.07565619222 0.07358691177 0.0181764706 0.006238630024 0.01194616843 -0.02046392741 0.003879833256 0.02423653469 0.005403420565 -0.2270453059 0.181017163 -0.1352652884 0.3259492558 -0.1332990848 -0.1110724794 -0.1162160383 0.3894711258 -0.1042531551 -0.1151410159 -0.1436695716 -0.117086566 -0.1159255408 0.1877836461 -0.1507987092 -0.1454093114 -0.1289628413 -0.1374635331 -0.1450115451 -0.01990174464 -0.01144712319 -0.004660665694 0.002520244036 0.01192849448 -0.01455306734 -0.01848723716 -0.0189742873 -0.0002930883315 -0.1381358485 -0.1480509137 -0.150743192 -0.1434217561 -0.1166120549 -0.1167134023 -0.1157732677 -0.1115712063 -0.1250756987 -0.1410133945 -0.1366496226 -0.1392237628 -0.03377044804 -0.047753573 -0.02904915259 -0.03439930869 -0.0135152696 -0.0009512906611 0.2824512142 0.2753977124 0.276596242 -0.1217738746 -0.1421685491 -0.1422092446 -0.1364484319 -0.1173307161 0.6104246087 0.6117702828 0.09971950462 -0.02923724086 -0.01891322292 -0.02812281218 -0.01272197099 0.02485403942 1.125024805 -0.1199956514 0.3232728465 -0.131057332 -0.1528319244 -0.1358446015 -0.138636385 -0.1274822874 -0.1175306256 -0.1032032469 -0.107680724 -0.137447221 -0.1435724126 -0.1151803966 -0.1373588441 -0.1346837058 0.04855412586 -0.1467813902 -0.1194318288 0.06326506989 0.03738822189 -0.1499329385 -0.1447513786 -0.1218440415 0.563836278 -0.131684977 -0.129213199 -0.1323325269 -0.1261120503 -0.1384569026 -0.1410420206 -0.1277794972 -0.1105374963 0.01488075179 0.001784114131 0.1511978124 0.3275181105 0.08470233002 0.01455532801 0.03072379983 0.01264303421 0.01864010689 0.0300132131 -0.01849647169 0.2485989615 -0.1280110717 -0.000202039441 -0.01115907788 0.01857257687 -0.03028419751 -0.01471302721 0.3548022464 0.3436407684 0.4039034894 0.07431900073 0.08603638258 -0.01227884198 0.2319892399 --0.1078639826 -0.1149271286 0.08666643808 -0.1018512237 0.06152204514 0.003287569087 -0.004858749156 -0.1086212183 0.00337546674 -0.01248980025 0.06690798641 0.02551401056 0.07498758485 -0.1000950641 0.08595231471 0.06360623231 0.04328930166 0.03435493129 0.03241912617 -0.0554961238 -0.08395197594 -0.05166935334 -0.07729772631 -0.07592128291 -0.02081598803 -0.03773219895 -0.04907971865 -0.07587057565 0.07046830459 0.1091488338 0.07309283351 0.07569760289 -0.006503348284 -0.003989238087 -0.005324687387 -0.002319216683 0.08684844291 0.08366926691 0.09473092751 0.0829268266 -0.08045551369 -0.06653942299 -0.08832206237 -0.08418338949 -0.07836850126 -0.09225183243 -0.1294308023 -0.1215184512 -0.1291567741 0.1135260095 0.1247451145 0.1283108827 0.1124855661 0.1371212389 -0.1085385357 -0.1189661396 -0.143203333 -0.07745022144 -0.09843746229 -0.07272168341 -0.08224420992 -0.07403825132 -0.1199956514 0.8727910187 -0.07717066304 0.4558641037 0.08790861185 0.07967434731 0.09657320079 0.07708590031 0.08800495054 -0.003745578934 -0.02501881296 0.05656886184 0.02469087729 0.03613853589 0.07540328752 0.06251449602 -0.02582056699 0.213111558 0.07565003297 -0.03070812165 -0.04156720883 0.1067706696 0.07579196721 0.06638793627 -0.1178063754 0.08879080155 0.05430444536 0.08219888967 0.05067525622 0.0625959468 0.07459328239 0.06791765438 0.1394003253 -0.0860685562 -0.08008208834 -0.1054811983 -0.1346033997 -0.05587195966 -0.09300549542 -0.05211565992 -0.08513612271 -0.0731264845 -0.01478571821 -0.003322367891 -0.1120983036 0.08591234663 -0.06229922198 -0.06966910988 -0.09435386228 -0.09181668575 -0.0903453663 -0.1213140244 -0.1276967563 -0.119325791 -0.02520525585 -0.05565484467 -0.08486506302 -0.1093926589 -0.2975599214 0.2649256751 -0.1150910238 0.3314012761 -0.1344008898 -0.09145933722 -0.07832501879 0.2030312527 -0.1147913919 -0.08601309587 -0.1411195248 -0.1292275701 -0.1259775205 0.2368707391 -0.1394116616 -0.1557369714 -0.1377287082 -0.1235173313 -0.1470358268 -0.004343258494 -0.00926170627 -0.01149058695 0.008433899675 0.03394142917 -0.02944319423 -0.01443026185 -0.004954599929 0.0287999668 -0.1221502456 -0.1303157827 -0.128516909 -0.1460940186 -0.08440821766 -0.113864377 -0.1144749199 -0.09852087335 -0.1159190621 -0.1339919063 -0.1317143363 -0.1302191495 -0.01382989008 -0.007533976787 -0.01173731467 -0.018905005 -0.02020012441 -0.01036340259 0.2574442617 0.2551223888 0.2582236772 -0.117738618 -0.1101839548 -0.1355182053 -0.1306292032 -0.1155681585 0.3934782923 0.3550490291 0.09166352048 0.008093118805 0.007484913553 -0.01006964397 -0.0117196256 0.008992304568 0.3232728465 -0.07717066304 1.128459712 -0.1228499606 -0.130447378 -0.1399278103 -0.1359716639 -0.1137629367 -0.1292739459 -0.1129305923 -0.09759298444 -0.135965226 -0.1426660776 -0.1250819266 -0.1388035301 -0.1401137484 0.05227974922 -0.1277914879 -0.1136958744 0.05542181599 0.08046439121 -0.1372002896 -0.142549102 -0.1221718142 0.49887892 -0.1420395161 -0.1291903332 -0.1088205111 -0.1109557141 -0.1089623694 -0.107377331 -0.1269888504 -0.1334860778 0.006415044414 0.008916593878 0.1545407519 0.3654759896 0.04360851255 0.01639008605 0.02329611782 0.01991382035 0.05073331331 0.05892774419 -0.01316706952 0.2318698074 -0.1357325414 0.004310409982 -0.01884229701 0.0279815357 0.005264653052 0.01770393864 0.3085671527 0.2562587273 0.3296679428 0.08554468788 0.04284226063 0.01624268105 0.2257111508 --0.1322021097 -0.134976116 0.08725223432 -0.1178758673 0.1091542146 -0.008928387897 -0.01474768298 -0.1350210665 0.02294455692 -0.001549716987 0.07535937297 0.05766694216 0.09477528667 -0.1201162859 0.09271412157 0.07562560217 0.04435581378 0.06132405702 0.04808060334 -0.07877012268 -0.08205070381 -0.06882275618 -0.07439203194 -0.07969120511 -0.01209989982 -0.02285306843 -0.04472465206 -0.07455433247 0.09992932554 0.0959611469 0.07452357195 0.1030685285 -0.02966870266 -0.01257538085 -0.01026192942 -0.01426440134 0.08730417135 0.06836780741 0.1036855703 0.08644524993 -0.08299218591 -0.07122657564 -0.09955605451 -0.08665097993 -0.09502684133 -0.0942786259 -0.1388657455 -0.1355187825 -0.134831031 0.1297622692 0.1613187881 0.15528486 0.1139006459 0.144350905 -0.1254871396 -0.1362429906 -0.1570241352 -0.08042930458 -0.09177407439 -0.07844690396 -0.1008379378 -0.08707182804 -0.131057332 0.4558641037 -0.1228499606 0.9120135149 0.102574099 0.1105694962 0.1259180716 0.0929305678 0.08210708231 -0.0186701494 -0.02229342976 0.06256566056 0.05010186978 0.0102172571 0.06198786787 0.07619430487 -0.00858475758 0.2755255981 0.09841616725 -0.0142986588 -0.02564819719 0.1341529633 0.1048465098 0.06006426412 -0.1427715022 0.08180607835 0.06746175988 0.07131030775 0.05271309207 0.0491992105 0.08239153198 0.07120902858 0.1149162836 -0.09601378159 -0.08631180796 -0.1264800097 -0.1484347765 -0.06547088501 -0.09696658588 -0.06682783486 -0.08690164634 -0.07457183364 0.01154034871 -0.01890228947 -0.1274496834 0.08704848082 -0.07079003616 -0.07304072637 -0.1064861474 -0.09677241055 -0.1068548386 -0.1334463182 -0.1411723895 -0.1324636327 -0.007215497057 -0.06741355452 -0.08665023363 -0.1295827029 --0.124830559 -0.1086374944 0.08762949914 -0.1347795282 0.08332777551 -0.0009280105533 -0.01108707424 -0.1435267853 0.03727200013 -0.008298138745 0.06910676162 0.04660131418 0.06100336225 -0.09476583027 0.1047405978 0.1426340788 0.07607458118 0.04641212182 0.07143704924 -0.0947861489 -0.08715208727 -0.05943126362 -0.07594145632 -0.08655234714 -0.05053996461 -0.04758374907 -0.06550294722 -0.09832262161 0.09728402861 0.1280249525 0.092598453 0.1718386303 -0.01088585861 -0.02958686924 -0.029017173 -0.02597531035 0.05135170327 0.08389069252 0.08367294787 0.08042347403 -0.08274660624 -0.07157729803 -0.1080746282 -0.09507136991 -0.08905490152 -0.08355956076 -0.1478246907 -0.1304008772 -0.1497340611 0.1281583485 0.1282590943 0.07936530443 0.06994804506 0.06777003142 -0.1502752153 -0.1466177303 -0.1437077888 -0.1069507477 -0.1059446322 -0.0988774308 -0.1027968565 -0.07052905431 -0.1528319244 0.08790861185 -0.130447378 0.102574099 0.9257842369 0.4505326182 0.4555916692 0.09930711146 0.1078368606 0.005112209891 -0.01412734282 0.09523966039 0.05000207614 0.0612003396 0.09899494794 0.1261817922 -0.03964258438 0.1012972979 0.1019930971 -0.04335416784 -0.02866466696 0.07160376855 0.0808747944 0.4215479054 -0.1489105183 0.08304772233 0.08151696751 0.05512388375 0.04374143666 0.04807264004 0.04438429103 0.02645954489 0.09480008933 -0.07782682711 -0.09332960019 -0.1128483644 -0.1305746019 -0.1028647685 -0.07999674114 -0.06120796821 -0.08783600121 -0.06166855187 -0.02775411834 -0.06155881266 -0.1207501947 0.04263297477 -0.09039223016 -0.06412944029 -0.09239036471 -0.08833395138 -0.08272101056 -0.1483438184 -0.146113088 -0.1370855086 -0.03660427732 -0.102153554 -0.09707847611 -0.1187719748 --0.1280788925 -0.1232901871 0.1202169274 -0.1316002637 0.04869952721 -0.0055915674 -0.03651873731 -0.1324206398 0.0922562768 -0.02170828795 0.04760084065 0.1194932988 0.06786001289 -0.1001205586 0.07121977232 0.1533542473 0.07595764839 0.05445521235 0.04557516538 -0.1023494624 -0.0931714367 -0.04310579219 -0.08955522498 -0.09542929455 -0.0174988064 -0.05401487887 -0.02562402858 -0.09635657443 0.05859249813 0.09000835439 0.07368756165 0.1500443567 -0.03364270495 -0.0607091901 -0.06004418469 -0.05648076846 0.02881879986 0.06158060229 0.05297643622 0.05155639203 -0.09671874463 -0.06647554294 -0.1040843903 -0.1035949249 -0.09887123467 -0.08726036929 -0.1316586246 -0.1264499901 -0.1363030587 0.08375960333 0.07940026375 0.08759447156 0.0852663763 0.05629991368 -0.1461844426 -0.1288835316 -0.142042321 -0.1081625121 -0.09993209579 -0.09700922363 -0.07430936711 -0.06478487305 -0.1358446015 0.07967434731 -0.1399278103 0.1105694962 0.4505326182 0.9598903151 0.5176265343 0.1394007851 0.1284556312 -0.01976537796 -0.03359287116 0.0740056748 0.09664100987 0.1047449375 0.1024145044 0.1039382746 -0.005221420513 0.06568178917 0.0993882661 -0.05425767616 -0.0008021220096 0.02572869393 0.0685460284 0.440775138 -0.1474073383 0.1011882551 0.106124413 0.07783574661 0.03702613971 0.04129006055 0.06120004602 0.03659288988 0.08477236545 -0.07025647476 -0.09776674952 -0.110508237 -0.1271826512 -0.08314219209 -0.08409438284 -0.0731861279 -0.08799826782 -0.07109295159 -0.02467708213 -0.02939023051 -0.1108200114 0.07363723343 -0.1021444435 -0.08739036328 -0.1030630654 -0.08392098651 -0.08515897978 -0.1475607747 -0.1411150589 -0.13197747 -0.03568216954 -0.08084099003 -0.1044259362 -0.1137042102 --0.1316203936 -0.1209192796 0.1333579826 -0.1162365538 0.04412508304 -0.005640780146 -0.01686244222 -0.1347566079 0.0420758221 -0.01401671875 0.05727163743 0.07778208649 0.0444669376 -0.112110765 0.09874772749 0.1336791615 0.04602329535 0.02750394343 0.04427086869 -0.085907058 -0.08121392342 -0.04685923664 -0.09067672922 -0.1061224709 -0.02781116881 -0.05186680063 -0.03642371588 -0.09562456757 0.09523053683 0.1116084523 0.09579238901 0.1248792456 -0.02417439706 -0.05006651936 -0.051495374 -0.04461514569 0.06204450756 0.08956890466 0.08889113813 0.06141497214 -0.08821616445 -0.05728176116 -0.0851267007 -0.08545894893 -0.09156467009 -0.09191885486 -0.1524162059 -0.1367744557 -0.1418698449 0.1025696182 0.1030996856 0.0944984183 0.08140201843 0.07778732778 -0.1501071635 -0.1369320495 -0.1511112128 -0.1130201853 -0.1117962019 -0.08745234949 -0.08490242559 -0.06751045349 -0.138636385 0.09657320079 -0.1359716639 0.1259180716 0.4555916692 0.5176265343 0.944593935 0.1098653649 0.1165263729 -0.01244651219 -0.0205215124 0.06451910637 0.06844351319 0.07921961149 0.0840078775 0.09016838344 -0.02854158882 0.06649861387 0.07339315139 -0.04282925095 -0.01152386149 0.05634727764 0.09278815204 0.4162064241 -0.1405176017 0.1107757174 0.09112748539 0.07517694453 0.03114108792 0.02645403588 0.05041289646 0.02622354008 0.07964864566 -0.09223326474 -0.09096500545 -0.112401502 -0.1345078077 -0.07595609748 -0.09227842475 -0.04737695371 -0.08131619706 -0.05986603069 -0.03298173764 -0.02493371199 -0.1290315302 0.07742730747 -0.0840198055 -0.06938064398 -0.1080408906 -0.08675908475 -0.09916831315 -0.1380161665 -0.1444567486 -0.1275486335 -0.04349012841 -0.07521190221 -0.08986306108 -0.1154943662 --0.1155268035 -0.1195722517 0.232262036 -0.113137837 0.05293203962 -0.02572619169 -0.04162650193 -0.1158766416 0.1187018953 0.0002614849865 0.07373805126 0.09768899748 0.2761047103 -0.1277236797 0.06379781733 0.04359413828 0.09518728412 0.05873639922 0.06595256564 -0.09800317835 -0.07857233776 -0.04388014216 -0.09854674912 -0.1035571038 -0.004447167962 -0.02025524253 -0.02560713628 -0.1024432242 0.1069418134 0.08495805351 0.06133589814 0.06741664727 -0.02470942066 -0.015882424 -0.01864435747 -0.02839638398 0.06798965869 0.06176326008 0.06011204034 0.06741414757 -0.08470272735 -0.08282043164 -0.07541792723 -0.07777992581 -0.1030482288 -0.08525986453 -0.1609116267 -0.1475642875 -0.1371868516 0.03479250218 0.03974932872 0.08158334551 0.1035151212 0.0756409708 -0.1093235337 -0.1421418074 -0.1325170903 -0.0934440657 -0.0920704702 -0.1024948988 -0.1012450887 -0.0865129833 -0.1274822874 0.07708590031 -0.1137629367 0.0929305678 0.09930711146 0.1394007851 0.1098653649 0.8684523014 0.4080508688 -0.01240083825 -0.01156274211 0.08066788702 0.08501812037 0.07278381315 0.09824324852 0.11966636 -0.0267198356 0.06137493541 0.2146215978 -0.009315808529 0.01664713684 0.06827747019 0.06014274164 0.1404947591 -0.1238717459 0.1517057762 0.1112626881 0.09660102428 0.07146353795 0.0907519453 0.07026547632 0.04980686302 0.1249747983 -0.07421777238 -0.08587544644 -0.09888834516 -0.1537151669 -0.09213783771 -0.06912780382 -0.06419059101 -0.063642642 -0.0997737537 -0.03836909598 -0.05178704047 -0.1348085449 0.1022386029 -0.08797269842 -0.08300351648 -0.098733934 -0.08669828029 -0.09496047395 -0.1293360036 -0.1408699705 -0.1218126708 -0.05829847718 -0.09187502316 -0.07528407628 -0.1171999451 --0.1361353205 -0.1300673313 0.2627293251 -0.1162367555 0.05507872142 -0.0348773763 -0.03438320903 -0.123974452 0.09108978885 -0.002954442369 0.08817625714 0.0720619224 0.2598693774 -0.1043306262 0.08420792821 0.04200546182 0.08607078929 0.05304335931 0.1054425243 -0.09599457534 -0.06933944309 -0.02162638661 -0.0853114289 -0.09049314239 -0.02763764622 -0.03167126296 -0.0453254819 -0.09017154016 0.08800772659 0.0755619741 0.05357995929 0.08657611001 -0.02241328008 -0.009317022671 -0.00867533662 0.0006793360355 0.05396273834 0.04747651945 0.06547704761 0.04935258543 -0.08971173766 -0.09427930682 -0.08349724807 -0.08720691431 -0.09257554837 -0.08102235464 -0.1416334586 -0.1401276246 -0.1357434848 0.06654633598 0.04957765482 0.08923364205 0.1162701251 0.07036921308 -0.12612328 -0.131226683 -0.1343416529 -0.09658677888 -0.1019677055 -0.1087352699 -0.1055629641 -0.07675070703 -0.1175306256 0.08800495054 -0.1292739459 0.08210708231 0.1078368606 0.1284556312 0.1165263729 0.4080508688 0.8784536352 -0.01124540833 -0.004233999085 0.07604981121 0.09002494569 0.1013189569 0.1038318168 0.1036161168 -0.01639648995 0.06768161994 0.2102921599 -0.01038430443 0.01361336023 0.05521330956 0.05273224244 0.09490034721 -0.1383342895 0.197007239 0.113679991 0.07995483305 0.06598180688 0.0902080435 0.06846205157 0.03980638088 0.1311836465 -0.09288205147 -0.1015525063 -0.1052951984 -0.1451540359 -0.07274239953 -0.09078702221 -0.04696961943 -0.07708178866 -0.09761367516 -0.04062627742 -0.03060320688 -0.1302771494 0.09996822148 -0.1008862068 -0.09222715979 -0.1056080477 -0.0809902411 -0.09242332937 -0.1351079226 -0.1435954431 -0.1272570524 -0.04625816867 -0.07278184909 -0.08468760467 -0.1285729275 --0.09255579254 -0.105119046 -0.04690082264 -0.1202207366 -0.02428266953 0.1650770794 0.1926099844 -0.0805273021 -0.01222214688 0.1870191522 -0.004330716152 -0.02223156435 0.008765840575 -0.09846378993 -0.02519182329 -0.02209880392 -0.02027260934 -0.009607520483 -0.01263937491 0.03674568663 0.02419687116 -0.06496750477 0.03315686338 0.01309186265 -0.04038784668 -0.08154286064 -0.06965775987 0.004488270033 -0.01843409305 -0.02892934172 -0.04432552751 -0.05220553287 0.1834753818 0.2644456663 0.2630768513 0.2511718365 -0.002226775412 -0.01600253669 -0.02302992506 -0.0176599622 0.06556559782 0.08226398155 0.05908975583 0.07043411309 0.08295207693 0.03019808185 -0.1219524504 -0.1160115183 -0.1143090784 -0.01047379572 -0.004079384898 -0.01460525295 -0.01766130347 -0.01091626288 -0.1108739615 -0.1006405068 -0.09672023764 -0.02298555151 -0.02397340594 -0.01705388694 0.0766898882 0.0103782079 -0.1032032469 -0.003745578934 -0.1129305923 -0.0186701494 0.005112209891 -0.01976537796 -0.01244651219 -0.01240083825 -0.01124540833 1.027901046 0.5227124749 -0.04155860494 -0.03951485552 -0.04896057478 -0.04969834944 -0.05043864897 -0.0837012384 -0.002129747192 -0.01274189299 -0.06338962377 -0.07708972625 -0.03709336213 -0.01865004145 -0.000239079936 -0.1205579183 -0.01282624017 -0.02565454477 -0.03898564844 -0.01764944165 -0.02459271726 -0.03318227607 -0.0104355162 -0.0012414127 0.01392483953 0.02107152751 -0.08884639519 -0.1238798896 0.05078150108 0.0373246256 -0.04798383777 -0.004187230361 -0.001710069513 -0.0612249441 -0.06225821487 -0.1107528695 -0.03529322465 0.04722137886 0.04920497067 0.003033217821 0.03354635468 0.02676961591 -0.09867552757 -0.1051904921 -0.1027248829 -0.06753994688 0.04884436968 0.04579324499 -0.08483675318 --0.1111700147 -0.1142758818 -0.05043391825 -0.1202744348 -0.01876334389 0.1842559084 0.1990179578 -0.08348769716 -0.01705913089 0.198774778 0.01540793976 -0.03420958711 0.004784386068 -0.08710373468 -0.01594367644 -0.01818587967 -0.003363962442 -0.01057316358 -0.003739452596 0.04826464028 0.03943938635 -0.06410690313 0.01128207602 0.01491739216 -0.04175612724 -0.07291410051 -0.08243276692 0.03540750421 -0.01242548044 -0.03356417522 -0.03120562615 -0.03344646725 0.1721850547 0.2596802833 0.2595781842 0.2421238162 -0.002842370279 -0.02244517719 -0.02073752415 -0.005500434936 0.05221083868 0.08406563617 0.1031380859 0.0745544096 0.06919807202 0.07411983806 -0.1270135522 -0.1192100078 -0.1153631302 -0.02498109907 0.009393524843 -0.01753812998 -0.00304886689 -0.02153858438 -0.1139917114 -0.1034549201 -0.09675521654 -0.001068117109 0.01706046121 0.01372345534 0.04836408776 0.009509554525 -0.107680724 -0.02501881296 -0.09759298444 -0.02229342976 -0.01412734282 -0.03359287116 -0.0205215124 -0.01156274211 -0.004233999085 0.5227124749 1.020711843 -0.04353216284 -0.03148248505 -0.04164833783 -0.06766725086 -0.05020986867 -0.08191327994 2.833005052e-05 -0.02465000232 -0.07326469144 -0.07325471171 -0.01395544474 -0.02422689449 -0.003342335581 -0.1188943288 -0.03608450512 -0.03250231962 -0.061846734 -0.03067030655 -0.03151633309 -0.0520044294 -0.008117529095 -0.007064403467 -0.00780839858 0.01563441681 -0.07535253168 -0.1202187838 0.04384014714 0.03519106934 -0.03883282793 0.007901926535 -0.002944854738 -0.06982881974 -0.07896436318 -0.110678918 -0.03529058336 0.05723072163 0.02246008328 0.02122491216 0.0257789976 0.03458748425 -0.1261302945 -0.1157769904 -0.09721999023 -0.06124853585 0.03971665467 0.04394091703 -0.09072421731 --0.1436838845 -0.1385849189 0.07003983094 -0.1613585736 0.09487473289 -0.03377626786 -0.06504452718 -0.1196445835 0.1426727117 -0.06063257811 0.1209204494 0.1313490688 0.1147703276 -0.1368367541 0.06574528013 0.2881566089 0.06791115785 0.09553719417 0.09750353968 -0.1070529021 -0.09501859281 -0.03152652361 -0.1126902479 -0.1153154226 -0.01870588017 -0.01403403626 -0.04238433001 -0.1062091073 0.09554723094 0.2442672532 0.2523980787 0.2834256896 -0.07180199311 -0.06739012239 -0.06872011873 -0.0720589962 2.886260561e-05 0.02099517854 0.02648685444 0.03569407256 -0.1089569539 -0.1044109373 -0.1397347292 -0.137036471 -0.1109142643 -0.1221108341 -0.1415201381 -0.1403789247 -0.1430903176 0.1034859366 0.1011940012 0.05689698829 0.04154947114 0.05981113399 -0.1418150997 -0.139515061 -0.1651957606 -0.1141025324 -0.1269392662 -0.1143506919 -0.1080538627 -0.08837675638 -0.137447221 0.05656886184 -0.135965226 0.06256566056 0.09523966039 0.0740056748 0.06451910637 0.08066788702 0.07604981121 -0.04155860494 -0.04353216284 0.9005320578 0.4195094749 0.4236161177 0.444233197 0.4568520765 -0.01651087947 0.07666123681 0.1265660036 -0.03113362722 -0.007149554117 0.05675955214 0.03260653241 0.03035898708 -0.1525072684 0.2185189028 0.2490662553 0.03627411164 0.06216840211 0.04210614532 0.0467193939 0.06576154773 0.08430560028 -0.1127955421 -0.1015039117 -0.07425812019 -0.1497981317 -0.08471711111 -0.1048375521 -0.05459802909 -0.1007575526 -0.09139959495 -0.05882961673 -0.02843731069 -0.1341088772 0.1453604125 -0.1201927647 -0.1093282331 -0.1037041945 -0.123016787 -0.1183436741 -0.1568644058 -0.1528780338 -0.1380178852 -0.06528797475 -0.08255377702 -0.1304006638 -0.1474470738 --0.1524987076 -0.1519026844 0.07962473906 -0.146328546 0.07259039681 -0.03981055535 -0.0711605451 -0.116924585 0.1253494328 -0.04295468877 0.1358617322 0.1311597368 0.1167636172 -0.1550316106 0.1045830154 0.297828352 0.04905444761 0.03730892328 0.09214766193 -0.1112042434 -0.09357459837 -0.0325689084 -0.1018561416 -0.111640168 -0.02526843751 -0.03443410372 -0.0385524614 -0.1185142502 0.1075209709 0.1752798646 0.2717078228 0.2994586999 -0.06518987683 -0.06386438943 -0.0647720455 -0.06301114316 0.02012667206 0.05648962767 0.05169121653 0.03347978228 -0.1060354004 -0.09254715363 -0.1277829514 -0.1315120598 -0.0951610037 -0.1112641638 -0.1594782639 -0.1558363469 -0.1519823294 0.07610114484 0.1012183036 0.07167873692 0.09792323682 0.05593853586 -0.159322642 -0.1386702977 -0.1669787199 -0.1211180188 -0.1033173591 -0.1091983495 -0.09915053528 -0.09452570429 -0.1435724126 0.02469087729 -0.1426660776 0.05010186978 0.05000207614 0.09664100987 0.06844351319 0.08501812037 0.09002494569 -0.03951485552 -0.03148248505 0.4195094749 0.8914191197 0.4988344735 0.3737732174 0.4591716351 -0.02471105197 0.05678653875 0.1514366591 -0.05263202851 0.006274789026 0.03342418966 0.02987143402 0.03428738595 -0.1546978418 0.2292354906 0.2760599395 0.0446130871 0.05347732398 0.04560080374 0.03175481181 0.04645156591 0.08377438508 -0.1163093348 -0.1121809559 -0.1014850735 -0.1599912456 -0.07159671186 -0.1108012029 -0.07239504837 -0.1048694393 -0.10946284 -0.05418326871 -0.01788124038 -0.141300693 0.1741219736 -0.1251102993 -0.1032699209 -0.1021955945 -0.107224096 -0.1144002829 -0.15582884 -0.1498254855 -0.1364230176 -0.04753670703 -0.07027765082 -0.1105779772 -0.1563397116 --0.1256602228 -0.1281327805 0.07556188174 -0.1337209213 0.04968411732 -0.04540361792 -0.08036824576 -0.1039605583 0.1030236553 -0.05733325366 0.0889674178 0.1141735863 0.1235013544 -0.1418467654 0.06422755814 0.3009088003 0.0517441437 0.04097991924 0.08714642999 -0.1015737283 -0.1192271908 -0.02011656 -0.1275185469 -0.130522196 -0.03965138306 -0.01495155867 -0.004201162268 -0.1213553421 0.1053793143 0.2309806944 0.3191124833 0.2860513825 -0.0709972945 -0.07072272587 -0.07292585479 -0.06915321557 0.01351778935 0.03361680923 0.04251873952 0.02764633339 -0.1280239853 -0.1024688117 -0.1360416658 -0.1350267256 -0.1112780573 -0.136673702 -0.1461156406 -0.1315666856 -0.1376409067 0.09612846762 0.0946289299 0.08058562762 0.09355104228 0.069918828 -0.1351680569 -0.1227277939 -0.1553777615 -0.109086104 -0.1118716966 -0.1100279114 -0.09561828899 -0.09450555347 -0.1151803966 0.03613853589 -0.1250819266 0.0102172571 0.0612003396 0.1047449375 0.07921961149 0.07278381315 0.1013189569 -0.04896057478 -0.04164833783 0.4236161177 0.4988344735 0.90378047 0.3868369208 0.4289472476 -0.01357938903 0.04135366217 0.1369232281 -0.03485596206 0.005591888241 0.03713149241 0.02507102146 0.0105386843 -0.1445618801 0.2293215304 0.2325087561 0.03957238486 0.05784947053 0.07344716678 0.03094169556 0.07226024578 0.06615811633 -0.123278271 -0.1086677186 -0.09272175269 -0.1245606779 -0.07459598878 -0.1036620979 -0.07076337214 -0.09739646833 -0.1179265077 -0.06281403934 -0.01032506267 -0.1288785617 0.1607439453 -0.1311809561 -0.1083166168 -0.1243873031 -0.1108202001 -0.121015703 -0.1360425305 -0.1347254825 -0.1393539434 -0.06048843117 -0.07063115801 -0.1179388413 -0.1476846516 --0.1251106187 -0.1216497857 0.06061192353 -0.1331172297 0.06528297197 -0.02550625734 -0.0736014879 -0.1210758089 0.1501268557 -0.06839138294 0.0972110319 0.1596933305 0.1108331539 -0.1352866262 0.08735757098 0.2947416952 0.1023004497 0.10897835 0.07504698879 -0.1117990163 -0.1057141987 -0.03825408858 -0.1281789772 -0.1384220645 -0.006966799497 -0.007187148402 -0.02608459055 -0.1156954009 0.06470035349 0.310909012 0.2503516998 0.2389626787 -0.06559014553 -0.0649154574 -0.06478375331 -0.05561182623 -0.01478693232 0.03011119145 0.04948907854 0.01110247427 -0.1150597428 -0.09470030557 -0.1502762864 -0.1297553282 -0.1282570496 -0.1424767161 -0.1511467418 -0.1308434649 -0.1417759368 0.09863659894 0.1351619926 0.05328331553 0.05483551328 0.06518273677 -0.1501718577 -0.1463440903 -0.1615574798 -0.1161676749 -0.1270479903 -0.1246250957 -0.1024005902 -0.1038747278 -0.1373588441 0.07540328752 -0.1388035301 0.06198786787 0.09899494794 0.1024145044 0.0840078775 0.09824324852 0.1038318168 -0.04969834944 -0.06766725086 0.444233197 0.3737732174 0.3868369208 0.9665803453 0.4453514545 -0.008069191026 0.04445682566 0.15285072 -0.03975555447 -0.02190059139 0.0708602263 0.03283794808 0.02289495092 -0.1607503333 0.2481006013 0.2349339998 0.03854018417 0.05542575262 0.03727400684 0.05000750226 0.05586050651 0.1008822714 -0.1140332436 -0.102550495 -0.1001798758 -0.1312337662 -0.09006452135 -0.1056441954 -0.0725596739 -0.1059847206 -0.09891735978 -0.05448691937 0.01928075278 -0.120589738 0.0824014904 -0.1244757758 -0.115846258 -0.1205427355 -0.1368342279 -0.1345478479 -0.1410961651 -0.1468759528 -0.1371866491 -0.06227834352 -0.08894154841 -0.1273174782 -0.1427755804 --0.1467809871 -0.1408957327 0.07896286535 -0.1348383669 0.0264850211 -0.04706179718 -0.06867312828 -0.1409152197 0.1494504141 -0.0577972447 0.08946553045 0.1639386676 0.1206791241 -0.1471894468 0.06839745176 0.2752649015 0.06292207446 0.06646361911 0.1121772059 -0.1200147857 -0.1236243064 -0.05873653593 -0.1161747156 -0.1217978352 -0.04594820132 -0.01653626015 -0.03943562439 -0.1150891765 0.1007922992 0.2410171493 0.2674661655 0.2937194692 -0.07134370871 -0.05372018892 -0.05425084404 -0.07161597816 0.002385096379 0.03807822493 0.03733156388 0.04463404701 -0.1251115148 -0.1028190444 -0.1344201402 -0.136108086 -0.1174695914 -0.1278821383 -0.1597167604 -0.1414322758 -0.1533592992 0.1017345501 0.1107678005 0.05858982681 0.05539841375 0.0758928821 -0.1403893749 -0.138154148 -0.1633113212 -0.1270908675 -0.119626227 -0.1131207492 -0.106970748 -0.09307295901 -0.1346837058 0.06251449602 -0.1401137484 0.07619430487 0.1261817922 0.1039382746 0.09016838344 0.11966636 0.1036161168 -0.05043864897 -0.05020986867 0.4568520765 0.4591716351 0.4289472476 0.4453514545 0.9326419422 -0.005219356726 0.05744971349 0.1568683785 -0.02911074753 0.0005727230237 0.03326568407 0.02633228457 0.03015351954 -0.1493862918 0.2374739981 0.2386761196 0.03994576466 0.05141669014 0.02491630293 0.03336334678 0.04716063029 0.0869361397 -0.1026787326 -0.102292931 -0.1015542907 -0.1413000379 -0.1022092167 -0.103554638 -0.06272879103 -0.09389870673 -0.1030880412 -0.05734743538 -0.008344183731 -0.1391757151 0.1587173401 -0.1240769767 -0.1072330008 -0.106543861 -0.1321366787 -0.133246333 -0.1487070689 -0.1567583393 -0.139155158 -0.0738493723 -0.1008522506 -0.1258677946 -0.1522498322 -0.05630648479 0.06333543251 -0.03692484064 0.04943912194 -0.0370330353 -0.04984083455 -0.06488076972 0.03871844167 0.004918098957 -0.06324410233 -0.05425656877 -0.007549482976 0.03528922109 0.2613581302 -0.06175867554 -0.008481367499 -0.04535368814 -0.04508467416 -0.03578155425 -0.07393878187 -0.044677762 -0.02296492138 -0.03484192313 -0.02935396006 -0.01343614972 -0.02609030271 -0.01273608887 -0.04645117896 -0.01306875475 -0.03319377517 -0.0262514195 -0.04705977604 -0.06819970824 -0.07473209069 -0.07733921262 -0.07409295318 -0.06210625846 -0.0674952133 -0.05299198692 -0.05898023835 -0.05313384312 -0.06801545187 -0.08196823352 -0.08660072424 -0.06180728347 -0.04999192069 0.2088730199 0.2095182598 0.2049304647 -0.05901365398 -0.0482516627 -0.05314888837 -0.02659767762 -0.04788671534 0.06713536463 0.04720503405 -0.03464821107 -0.05450091403 -0.04865785281 -0.06245149562 -0.04165787201 -0.02468363142 0.04855412586 -0.02582056699 0.05227974922 -0.00858475758 -0.03964258438 -0.005221420513 -0.02854158882 -0.0267198356 -0.01639648995 -0.0837012384 -0.08191327994 -0.01651087947 -0.02471105197 -0.01357938903 -0.008069191026 -0.005219356726 0.9348756991 -0.0585081316 -0.004744739574 0.3698528424 0.3648229828 -0.06585342669 -0.07057190796 -0.02308513413 0.04010226459 0.007156611341 -0.0001705281742 -0.01776986077 -0.01396958079 -0.01458811468 -0.01473890672 -0.0582198712 -0.03539209998 -0.05756716635 -0.05218413264 -0.0183118734 0.1310506946 -0.02195626621 -0.05596795537 -0.03243002654 -0.05461951907 0.02436190247 -0.001148871819 -0.02178423013 0.2844269744 -0.01092106385 -0.04751822292 -0.07107834154 -0.05239491606 -0.03682165153 -0.02335687548 0.05125071058 0.04883373617 0.04893600837 0.0490695351 -0.02181494569 -0.0451621325 0.05788929426 --0.1395524599 -0.1380613844 0.04239982644 -0.1276458889 0.3026102164 -0.02426372206 -0.01234002987 -0.1462565189 0.03890162089 -0.009542301784 0.1635826636 0.04047344103 0.06279015581 -0.1167728349 0.19974322 0.07743458653 0.07869764968 0.08353866269 0.09400813687 -0.06684044649 -0.06812159395 -0.0623222851 -0.09586467052 -0.08657149494 -0.02109866546 -0.04577946442 -0.01597333115 -0.07916472594 0.08340284875 0.07887022081 0.06169173042 0.08095917657 -0.008636942177 0.001841063756 0.004049728138 -0.0005670863514 0.1086863467 0.2044581481 0.192918054 0.2089759336 -0.06193675855 -0.07176123082 -0.07872361871 -0.07932476768 -0.08653397279 -0.07938365847 -0.1261273485 -0.1584416794 -0.1551271234 0.06816211616 0.0679274643 0.1106934927 0.09165024498 0.09491974893 -0.1523883947 -0.1391397171 -0.1464897971 -0.09973830508 -0.08393564358 -0.0861551622 -0.1056118922 -0.06949086459 -0.1467813902 0.213111558 -0.1277914879 0.2755255981 0.1012972979 0.06568178917 0.06649861387 0.06137493541 0.06768161994 -0.002129747192 2.833005052e-05 0.07666123681 0.05678653875 0.04135366217 0.04445682566 0.05744971349 -0.0585081316 0.9193145285 0.1076997648 -0.026514637 -0.03496558334 0.1229408421 0.09398327681 0.09327841647 -0.1430211804 0.06986708964 0.09612589834 0.08165068877 0.03050959427 0.07989374933 0.06963675093 0.09693059657 0.1051933286 -0.09067200071 -0.09057906005 -0.09296648141 -0.1439639107 -0.08894176089 -0.08963987373 -0.06229363381 -0.09922579725 -0.07636480237 -0.0269661618 -0.01999259619 -0.1470924644 0.07995616546 -0.07847785485 -0.06861529205 -0.111643268 -0.09879957575 -0.09269500344 -0.1300589551 -0.1328814432 -0.1566151598 -0.02687319193 -0.08971966045 -0.08594122959 -0.1318577905 --0.1144104733 -0.1148598787 0.131710628 -0.1295464663 0.09524794545 -0.023005376 -0.05242861933 -0.1241047548 0.1450491276 -0.02787373264 0.1019124638 0.1157223582 0.1592298929 -0.1363332801 0.1042826204 0.1018031858 0.1256114294 0.08546314425 0.08937612435 -0.1083005431 -0.1227834326 -0.05171103218 -0.07393060854 -0.09131358381 -0.04674683669 -0.02502358247 -0.02886006356 -0.1072218106 0.04588754749 0.099589245 0.09169877676 0.0975216524 -0.0249852972 -0.01578459788 -0.01595978029 -0.01780152254 0.07407772073 0.09350757024 0.08731027553 0.08884298697 -0.08908362505 -0.0917449782 -0.1070312728 -0.1048522665 -0.1060082956 -0.09250527544 -0.1512565522 -0.1308732309 -0.1308386735 0.04818131753 0.06499558436 0.08799703344 0.08470041835 0.08616985699 -0.1290939962 -0.1437711565 -0.1474392467 -0.1133789061 -0.1092906448 -0.1068624187 -0.1032647671 -0.09506358848 -0.1194318288 0.07565003297 -0.1136958744 0.09841616725 0.1019930971 0.0993882661 0.07339315139 0.2146215978 0.2102921599 -0.01274189299 -0.02465000232 0.1265660036 0.1514366591 0.1369232281 0.15285072 0.1568683785 -0.004744739574 0.1076997648 0.9212677398 0.01500608245 0.02599427129 0.05929415024 0.09641173227 0.08079454835 -0.1286969446 0.1427275672 0.1942921116 0.1050947552 0.08964838886 0.1211672987 0.09644922128 0.05120704805 0.117059875 -0.09985692436 -0.09375340835 -0.1295752861 -0.1474454041 -0.09841151537 -0.09388407431 -0.09216673036 -0.09964631612 -0.09407290283 -0.0487117261 -0.03778098482 -0.1155220565 0.119627584 -0.08673550998 -0.09342375932 -0.09698134143 -0.07877749714 -0.1026883828 -0.1349607464 -0.157810761 -0.1416165818 -0.04725143744 -0.09946889075 -0.1053058957 -0.1428769236 -0.06093594629 0.05553967664 -0.02666340193 0.04929220285 -0.01607588287 -0.04880947245 -0.06346649846 0.04077571769 -0.03291590274 -0.06594516878 -0.03109741977 -0.04342036383 0.0241006354 0.1629129468 -0.05767379835 -0.05657825841 -0.03983065415 -0.02971760264 -0.03580386213 -0.04839473748 -0.03311824749 -0.02663175231 -0.02386975074 -0.02503576944 -0.01554515447 -0.03264192076 -0.02228278222 -0.04321389391 -0.002726862706 -0.02198248243 -0.02798571255 -0.0580633252 -0.06644318722 -0.05446147547 -0.05678792725 -0.05636903984 -0.03429535467 -0.05253070547 -0.04501984591 -0.0582266836 -0.04560487407 -0.04843242647 -0.04287990195 -0.05252525498 -0.05192596285 -0.02688649141 0.1845168792 0.2517859963 0.232386493 -0.04675663703 -0.03784480228 -0.0323583989 -0.04231906662 -0.03514859413 0.05715898586 0.02316352388 -0.01028795383 -0.03892136782 -0.0381267221 -0.06191417033 -0.04620939266 -0.03744579076 0.06326506989 -0.03070812165 0.05542181599 -0.0142986588 -0.04335416784 -0.05425767616 -0.04282925095 -0.009315808529 -0.01038430443 -0.06338962377 -0.07326469144 -0.03113362722 -0.05263202851 -0.03485596206 -0.03975555447 -0.02911074753 0.3698528424 -0.026514637 0.01500608245 0.9084380262 0.3957761692 -0.04390681372 -0.05203009515 -0.0183468275 0.02932579058 0.0028438947 -0.01912669706 -0.0315579593 -0.03609169518 -0.02898928665 -0.04060805325 -0.04989938595 -0.01995160716 -0.03294581301 -0.05554636772 -0.01185265697 0.09425719686 -0.02737963364 -0.06612009441 -0.03689479722 -0.05663021023 0.003086546658 0.002482137674 -0.03348405101 0.2419881013 -0.004473910254 -0.03296569552 -0.06352425974 -0.04840321684 -0.0522493691 -0.03035350847 0.05721322614 0.04913109125 0.02096806263 0.05227401326 -0.02713738485 -0.03743693351 0.0590248186 -0.06079334116 0.04183441494 -0.0304015018 0.05101831965 -0.04288195977 -0.05885715457 -0.07617290294 0.04417156981 0.0261568621 -0.08020830003 -0.05927227918 0.0007708085106 0.01150495991 0.2292540801 -0.04117152266 -0.01761262233 -0.04311302675 -0.0552044177 -0.04348612293 -0.06489692464 -0.04458748434 -0.04468613469 -0.05371408097 -0.04868685866 -0.03623118901 -0.03319381618 -0.02892894219 -0.04778702442 -0.007847139019 -0.03064891489 -0.01522562657 -0.03357849357 -0.07368978231 -0.08749955126 -0.0913425504 -0.08743028085 -0.03205500937 -0.04080505792 -0.03593681594 -0.06184855021 -0.07800874299 -0.05179034464 -0.05283423044 -0.08306432187 -0.07416415164 -0.04637680731 0.2157520056 0.2421066446 0.259394159 -0.02127829889 -0.02804476571 -0.03643339104 -0.02041546821 -0.03382495022 0.03351767552 0.04385199011 -0.03906753165 -0.06209751887 -0.06287547993 -0.06368258287 -0.05218402068 -0.05325371247 0.03738822189 -0.04156720883 0.08046439121 -0.02564819719 -0.02866466696 -0.0008021220096 -0.01152386149 0.01664713684 0.01361336023 -0.07708972625 -0.07325471171 -0.007149554117 0.006274789026 0.005591888241 -0.02190059139 0.0005727230237 0.3648229828 -0.03496558334 0.02599427129 0.3957761692 0.9147411922 -0.06383521153 -0.07544898179 -0.01792310789 0.0263683313 -0.01225672402 0.02821289432 -0.01245473432 -0.03026177647 -0.02732742759 -0.03669327877 -0.0415284188 -0.05069048506 -0.05140295682 -0.06005362673 -0.02225013625 0.1287140832 0.01097943276 -0.07088540272 -0.02536357525 -0.07543775532 -0.008759114831 0.001460794227 -0.02561441094 0.185105027 0.01143402353 -0.05224745352 -0.07400865347 -0.06207501527 -0.06968208243 -0.04054454545 0.06267682525 0.05800157754 0.02513146236 0.04787958789 0.01217102198 -0.05662863015 0.07418906785 --0.1239610135 -0.135423117 0.1502951418 -0.1280830534 0.1307891718 -0.02589273732 -0.0490390625 -0.1486218288 0.03302840065 -0.02837223495 0.1302717261 0.03449024095 0.07523888486 -0.1367994445 0.1329984151 0.07990350436 0.09740479758 0.09967318881 0.08068178994 -0.07258372676 -0.05882959381 0.01458697845 -0.1130237909 -0.1095259483 -0.06964114624 -0.0513518013 -0.05923380957 -0.104650407 0.07586908604 0.08055376474 0.08107365502 0.06199633705 -0.03174686264 -0.01978807362 -0.01990095541 -0.02204979278 0.1535737808 0.1058631452 0.1282674331 0.146385653 -0.09035922731 -0.0973667827 -0.1044560852 -0.09167230265 -0.08576845966 -0.08447186846 -0.1569739779 -0.1331377061 -0.126375222 0.086070062 0.1331019721 0.2871330627 0.2370296687 0.2880351648 -0.1493881023 -0.1613758922 -0.1564936535 -0.08964477107 -0.09866379823 -0.1067856369 -0.1160561066 -0.1100577276 -0.1499329385 0.1067706696 -0.1372002896 0.1341529633 0.07160376855 0.02572869393 0.05634727764 0.06827747019 0.05521330956 -0.03709336213 -0.01395544474 0.05675955214 0.03342418966 0.03713149241 0.0708602263 0.03326568407 -0.06585342669 0.1229408421 0.05929415024 -0.04390681372 -0.06383521153 0.8979933206 0.4521976 0.0492471236 -0.1558681175 0.03914304122 0.03743555006 0.126829342 0.1598292227 0.181303958 0.2193485024 0.1663639015 0.06434367247 -0.09757641898 -0.1041283688 -0.1005022201 -0.1448474156 -0.09046853843 -0.09832744519 -0.08743408791 -0.1070211001 -0.09234380525 0.1131660417 -0.03251673426 -0.1434217909 0.08388393818 -0.08277419917 -0.09589444289 -0.1211947293 -0.09065568682 -0.09120228111 -0.1401941499 -0.165695724 -0.1567451329 0.066019108 -0.0908459456 -0.08639213199 -0.1577959635 --0.1263040208 -0.1388055064 0.1197742592 -0.1315693396 0.1101008913 -0.004440433683 -0.03552559161 -0.1576560081 0.0184871718 -0.01032261197 0.09416276641 0.0325437371 0.07382577051 -0.1381953319 0.100951961 0.04595924426 0.09894112601 0.09643953619 0.08920821178 -0.0698378953 -0.07566309989 -0.02552455622 -0.09023159644 -0.07858099205 -0.05893466449 -0.06370496565 -0.03786220638 -0.09996422859 0.06625269159 0.07708132544 0.0586049929 0.05173238749 -0.01248896213 -0.01369018803 -0.01236685793 0.0001976749928 0.1211206289 0.1006801251 0.1177947903 0.1231344323 -0.08582714386 -0.08311070093 -0.09645953472 -0.08091223032 -0.08935379381 -0.09613478534 -0.1468542911 -0.1373573589 -0.1308159132 0.08803878333 0.09557233778 0.268222176 0.2100584054 0.2412688774 -0.1579725422 -0.1622121325 -0.1413876757 -0.08101444795 -0.08577248315 -0.0880462353 -0.09357869557 -0.08426805538 -0.1447513786 0.07579196721 -0.142549102 0.1048465098 0.0808747944 0.0685460284 0.09278815204 0.06014274164 0.05273224244 -0.01865004145 -0.02422689449 0.03260653241 0.02987143402 0.02507102146 0.03283794808 0.02633228457 -0.07057190796 0.09398327681 0.09641173227 -0.05203009515 -0.07544898179 0.4521976 0.9004919442 0.0931223815 -0.1544159531 0.03511446477 0.04174253015 0.1382255447 0.1535865614 0.1796649219 0.1999359587 0.167841646 0.08477251534 -0.0889237133 -0.1079903377 -0.1024983938 -0.1231721892 -0.1132316065 -0.1016887217 -0.07915251931 -0.1028467784 -0.08512822699 0.1527481275 -0.03193652377 -0.1414735735 0.08899192775 -0.08144204018 -0.08645040382 -0.1069181323 -0.07175215527 -0.08009325019 -0.1312812429 -0.1592083222 -0.1531040635 0.1387623152 -0.1127362068 -0.07223567687 -0.1615338991 --0.1092772265 -0.09711176129 0.1259256107 -0.115961023 0.0647071067 -0.014051607 0.02121113489 -0.1080562084 0.03764849094 -0.01717023318 0.06898332643 0.06338545823 0.05086283125 -0.08641046391 0.06752117927 0.09419918932 0.07396883839 0.06363521404 0.04553536491 -0.06788162051 -0.0665812151 -0.06705078016 -0.06682193213 -0.07301482992 -0.02500251037 -0.04204952631 -0.04619026891 -0.07316672683 0.05505503725 0.02060384901 0.01939612222 0.04158510047 -0.01342869358 -0.02694563112 -0.02692723424 -0.034711451 0.03730259499 0.08701667288 0.06336885951 0.08091464699 -0.08200997548 -0.04181983598 -0.06790618309 -0.07135020985 -0.07513183754 -0.07113962955 -0.1307156773 -0.110440449 -0.1186025204 0.01865054626 0.05687639729 0.07277438009 0.06305920355 0.05513241107 -0.1148272142 -0.1184265023 -0.1195115985 -0.08676242669 -0.08038604592 -0.06636479603 -0.0743112709 -0.04471881993 -0.1218440415 0.06638793627 -0.1221718142 0.06006426412 0.4215479054 0.440775138 0.4162064241 0.1404947591 0.09490034721 -0.000239079936 -0.003342335581 0.03035898708 0.03428738595 0.0105386843 0.02289495092 0.03015351954 -0.02308513413 0.09327841647 0.08079454835 -0.0183468275 -0.01792310789 0.0492471236 0.0931223815 0.9563519298 -0.1187066075 0.01815845296 0.0330061445 0.05730133113 0.02149152345 0.030135497 0.05145301781 0.02104400106 0.07864615013 -0.05816120707 -0.07641767935 -0.1011151117 -0.113438468 -0.08275470917 -0.06299309691 -0.05147791707 -0.06895918537 -0.03812618221 -0.0156925095 -0.02909261783 -0.08566223766 0.05375965249 -0.07078802082 -0.06225679296 -0.07770306554 -0.07921324351 -0.0631172474 -0.1269683687 -0.1181305918 -0.1125789026 -0.0418291874 -0.08171369601 -0.0758511405 -0.08378397545 -0.267513591 0.2351939192 -0.122388009 0.4582017533 -0.1398684332 -0.1065767762 -0.0945885377 0.1966304581 -0.118208929 -0.1126499856 -0.1489892969 -0.1322545124 -0.1396426944 0.2193624399 -0.1519333124 -0.1604294836 -0.1532584057 -0.1504955091 -0.148303749 -0.01720309701 0.006516283222 -0.008648696411 0.003703836934 -0.004973176231 -0.009379486069 0.00155234127 0.0119819338 0.008962007581 -0.1227290925 -0.1477099787 -0.1400566966 -0.1481018645 -0.1102220968 -0.1348927256 -0.1358119372 -0.1319140639 -0.1116915975 -0.1397544397 -0.1435893156 -0.1197341551 -0.02940790922 -0.02985614895 -0.01500617579 -0.03626187232 -0.02236367245 -0.01145363331 0.238744935 0.2216910504 0.2318279326 -0.1244974573 -0.1355887885 -0.1593270282 -0.1443346558 -0.1396775956 0.5938955473 0.5532423065 0.07928755333 -0.01948409016 -0.01775061188 -0.02711353223 -0.03005532414 0.0091758413 0.563836278 -0.1178063754 0.49887892 -0.1427715022 -0.1489105183 -0.1474073383 -0.1405176017 -0.1238717459 -0.1383342895 -0.1205579183 -0.1188943288 -0.1525072684 -0.1546978418 -0.1445618801 -0.1607503333 -0.1493862918 0.04010226459 -0.1430211804 -0.1286969446 0.02932579058 0.0263683313 -0.1558681175 -0.1544159531 -0.1187066075 1.114124308 -0.148968294 -0.1430993461 -0.1267288232 -0.1356977317 -0.1396445246 -0.1276848605 -0.1331825354 -0.1239963998 0.02160836272 0.01201292066 0.2422539128 0.4362694785 0.02728901799 0.0293137309 0.0411621613 0.01876927677 0.04245153331 0.04567609527 -0.02824408027 0.2062195287 -0.1221794244 -0.001788073024 -0.01262804023 0.01604154243 -0.02386835864 -0.0173350223 0.4343821499 0.3260311834 0.561676114 0.07287390024 0.03024531639 -0.02522059075 0.2457328434 --0.1268980977 -0.1223398249 0.06143038669 -0.1321409636 0.09207529155 -0.06377453264 -0.06485467768 -0.1234574067 0.2197698774 -0.03643075437 0.1375332379 0.1767019552 0.2076173412 -0.1178355605 0.1020333583 0.106732186 0.06196536133 0.09544177044 0.1021543101 -0.09946245734 -0.1064438165 -0.03976356973 -0.1087694334 -0.1127135352 -0.01872395884 -0.02000943237 -0.01780591133 -0.1007959002 0.07679271023 0.1157351152 0.1285278602 0.1686793665 -0.06290622084 -0.05779707099 -0.06141317332 -0.02900063846 0.01957390728 0.04247615361 0.0586881436 0.03589772336 -0.1115349711 -0.1049384361 -0.1270065257 -0.1080917191 -0.09685525505 -0.1161392059 -0.1582955234 -0.1344417276 -0.1294970426 0.1232317769 0.08945765018 0.134739193 0.1008036422 0.09125146998 -0.1423193168 -0.1356957152 -0.1526356069 -0.114829595 -0.1137656071 -0.1047187996 -0.1020407755 -0.09206399382 -0.131684977 0.08879080155 -0.1420395161 0.08180607835 0.08304772233 0.1011882551 0.1107757174 0.1517057762 0.197007239 -0.01282624017 -0.03608450512 0.2185189028 0.2292354906 0.2293215304 0.2481006013 0.2374739981 0.007156611341 0.06986708964 0.1427275672 0.0028438947 -0.01225672402 0.03914304122 0.03511446477 0.01815845296 -0.148968294 1.010301721 0.3920672031 0.06066354364 0.02961849574 0.03466258409 0.03759977728 0.02219020034 0.07376190695 -0.1192438995 -0.106409821 -0.08720409163 -0.1191376984 -0.1156912109 -0.1076010931 -0.07208584281 -0.08865338617 -0.09346241149 -0.04892951058 -0.0164978256 -0.1254491372 0.09953255489 -0.1166595363 -0.08723427243 -0.1292213087 -0.1146219137 -0.1016808403 -0.1404728812 -0.1413056214 -0.1469665752 -0.03226738919 -0.1140150904 -0.1012036831 -0.1236089604 --0.1411780367 -0.1408607675 0.05671312669 -0.1395580243 0.09814961187 -0.05020927068 -0.05593158406 -0.1250961763 0.1963716828 -0.04900115143 0.1188447239 0.1456623453 0.106817528 -0.1278024552 0.09070066345 0.1364951127 0.05065055784 0.08221957624 0.0628750146 -0.102726754 -0.1086005414 -0.05552663803 -0.09670053154 -0.09773335955 -0.009967959068 -0.0138722035 -0.01353802681 -0.1002035454 0.06212230983 0.131823391 0.1443700582 0.157015152 -0.06211615909 -0.0582331879 -0.05855719724 -0.05106779893 0.04516180714 0.07309302566 0.07724477951 0.03862736783 -0.09821805276 -0.1004463001 -0.09474913154 -0.08905900927 -0.1020911498 -0.09948321373 -0.137275277 -0.1322421854 -0.1206157682 0.1287064176 0.1153199935 0.1248509825 0.07539557874 0.0815116744 -0.1431803596 -0.1406485355 -0.1421101993 -0.112964512 -0.1019964347 -0.1012206393 -0.09974053911 -0.09446772131 -0.129213199 0.05430444536 -0.1291903332 0.06746175988 0.08151696751 0.106124413 0.09112748539 0.1112626881 0.113679991 -0.02565454477 -0.03250231962 0.2490662553 0.2760599395 0.2325087561 0.2349339998 0.2386761196 -0.0001705281742 0.09612589834 0.1942921116 -0.01912669706 0.02821289432 0.03743555006 0.04174253015 0.0330061445 -0.1430993461 0.3920672031 0.8905459417 0.04226196542 0.0685883355 0.03564907953 0.03452289049 0.05304823749 0.07183809999 -0.09058615099 -0.10138792 -0.08489508262 -0.1254953989 -0.09617841527 -0.1011331718 -0.06420047146 -0.09331542765 -0.09530714432 -0.04188842859 -0.02723475202 -0.1154499147 0.1635433882 -0.1026149212 -0.08585544823 -0.1098605761 -0.107477989 -0.1102440549 -0.1562053574 -0.1539312797 -0.1417599219 -0.04798225084 -0.09602176108 -0.1099649103 -0.1334074576 --0.117103985 -0.12482723 0.2146869561 -0.1167352908 0.1326453189 -0.04507492412 -0.05281292006 -0.1296651268 0.05769795654 -0.03328308933 0.1094375728 0.05928925627 0.09316807779 -0.1340238799 0.0888059368 0.03628421193 0.1278405478 0.1210683933 0.06786582455 -0.1018474232 -0.1080043374 0.05367573373 -0.08849540731 -0.09968550411 -0.05580978937 -0.04626739359 -0.03663598381 -0.08656226023 0.0725914432 0.06032987028 0.07314869779 0.06148961319 -0.0515393168 -0.05323409532 -0.05249135609 -0.05466509083 0.2581610434 0.1858655766 0.1993034184 0.1664704724 -0.09773583618 -0.08921055767 -0.1093387248 -0.1059207073 -0.114506689 -0.1256175869 -0.145759132 -0.1351927225 -0.1499504514 0.04201496239 0.05454891204 0.07351068404 0.0710218317 0.02045871676 -0.114689915 -0.1457244147 -0.1480433766 -0.1278387823 -0.1148476745 -0.1093156371 -0.09125249463 -0.07607463843 -0.1323325269 0.08219888967 -0.1088205111 0.07131030775 0.05512388375 0.07783574661 0.07517694453 0.09660102428 0.07995483305 -0.03898564844 -0.061846734 0.03627411164 0.0446130871 0.03957238486 0.03854018417 0.03994576466 -0.01776986077 0.08165068877 0.1050947552 -0.0315579593 -0.01245473432 0.126829342 0.1382255447 0.05730133113 -0.1267288232 0.06066354364 0.04226196542 0.8849224394 0.3473258389 0.3995733601 0.414067389 0.2269337697 0.03590951045 -0.0940658636 -0.08965822772 -0.08609583883 -0.1497044987 -0.1062333506 -0.08857350031 -0.06472664712 -0.08813451042 -0.0719211599 -0.02915214806 -0.02601621418 -0.1218054796 0.2635028092 -0.09264911124 -0.1005438452 -0.103819081 -0.09309613571 -0.09792425361 -0.1305456182 -0.1405847556 -0.1222511888 -0.06297799997 -0.1045345337 -0.1138046183 -0.1236913548 --0.1212583052 -0.1288860319 0.2082166145 -0.1272603502 0.1405972086 -0.009063021656 -0.05427509482 -0.1027703102 0.03090543946 -0.03147127967 0.0635233475 0.02825395272 0.09232249771 -0.1323879275 0.05383896365 0.01910471841 0.110981635 0.08474428275 0.07119194656 -0.09015697157 -0.1099485512 0.06281437098 -0.06970902276 -0.07915124602 -0.03635417361 -0.04576607704 -0.03896660887 -0.08182753445 0.0961828998 0.08325328815 0.1078765706 0.03297117252 -0.03461514882 -0.02038032853 -0.01929130802 -0.0223871857 0.1980282321 0.09603368339 0.1506565712 0.1560228402 -0.08062507181 -0.09346126129 -0.124812544 -0.09811311168 -0.093559331 -0.1029981506 -0.1398329707 -0.1288740201 -0.1315202122 0.05252059966 0.05614111708 0.0604850374 0.05186562876 0.0212046183 -0.1166451142 -0.1246789453 -0.143672986 -0.1106642371 -0.1035726732 -0.0972400279 -0.08756889007 -0.07664477183 -0.1261120503 0.05067525622 -0.1109557141 0.05271309207 0.04374143666 0.03702613971 0.03114108792 0.07146353795 0.06598180688 -0.01764944165 -0.03067030655 0.06216840211 0.05347732398 0.05784947053 0.05542575262 0.05141669014 -0.01396958079 0.03050959427 0.08964838886 -0.03609169518 -0.03026177647 0.1598292227 0.1535865614 0.02149152345 -0.1356977317 0.02961849574 0.0685883355 0.3473258389 0.8923584766 0.4472160541 0.390650576 0.2885514784 0.07667484253 -0.08962450213 -0.09713083339 -0.1104944649 -0.1515087722 -0.08334930482 -0.1026878011 -0.08166130347 -0.08437252341 -0.09312026084 -0.02607259881 -0.02921714014 -0.1211830427 0.2060182231 -0.08223636087 -0.08259682058 -0.1038301024 -0.07164654746 -0.08296989073 -0.1338791815 -0.1335736376 -0.1260396375 -0.04971705847 -0.08276848148 -0.09139043105 -0.1419950539 --0.1286071031 -0.1393338945 0.1945856063 -0.1351881561 0.1487242639 -0.03065401419 -0.05312968547 -0.1364780927 0.02908002772 -0.04333001016 0.09458872088 0.02878496705 0.1087191182 -0.1241648329 0.08682504412 0.03876088495 0.1442930114 0.1247282778 0.1220647065 -0.09196671926 -0.09641039072 0.04874208452 -0.08794555793 -0.09616525755 -0.05934438016 -0.06743843175 -0.04199045169 -0.08890651564 0.07997465795 0.07402793148 0.09324865168 0.03940022036 -0.02780342134 -0.02064578311 -0.02075238123 -0.0233719075 0.2193105899 0.154144287 0.1355613739 0.1780893557 -0.0867077646 -0.09895391957 -0.1088069021 -0.08726379706 -0.1071772303 -0.1046548722 -0.1462368258 -0.1443680431 -0.1400317618 0.01876859042 0.04132148169 0.04779984667 0.05362623622 0.02833259561 -0.1358777077 -0.157395867 -0.1455770357 -0.1025071186 -0.1024893749 -0.09986017776 -0.10790692 -0.08694743417 -0.1384569026 0.0625959468 -0.1089623694 0.0491992105 0.04807264004 0.04129006055 0.02645403588 0.0907519453 0.0902080435 -0.02459271726 -0.03151633309 0.04210614532 0.04560080374 0.07344716678 0.03727400684 0.02491630293 -0.01458811468 0.07989374933 0.1211672987 -0.02898928665 -0.02732742759 0.181303958 0.1796649219 0.030135497 -0.1396445246 0.03466258409 0.03564907953 0.3995733601 0.4472160541 0.9170025331 0.466858707 0.2878596612 0.08072529569 -0.09091972895 -0.08413672617 -0.1230888952 -0.1416474596 -0.1020699091 -0.09568634743 -0.08082077475 -0.08839915822 -0.0948051824 -0.06185014695 -0.03632206802 -0.1183535047 0.2324654038 -0.1097750029 -0.1022442668 -0.1105603432 -0.08358890668 -0.0866904721 -0.1449071791 -0.1555695189 -0.1353458003 -0.07620184722 -0.1011619987 -0.09843894053 -0.1465453505 --0.1233581566 -0.1150247928 0.2353912559 -0.1213038152 0.1571420001 -0.02030546838 -0.04020446757 -0.1470629186 0.04516123779 -0.03857058129 0.1119374827 0.04699158204 0.1074208553 -0.1206869565 0.09025623768 0.05357636874 0.1546185897 0.1699862429 0.1166204796 -0.0740978492 -0.08166431753 0.01273318316 -0.08117093501 -0.08821318619 -0.06019081 -0.05272337614 -0.04050058428 -0.08343590364 0.06033058927 0.07244832734 0.06773091193 0.03543735179 -0.05035029346 -0.03427792075 -0.03144813167 -0.03595813742 0.2206692445 0.1660051709 0.1472358767 0.1873897727 -0.09105023349 -0.07072250246 -0.1119541788 -0.09954017902 -0.1129959092 -0.1167057373 -0.156126063 -0.1460661034 -0.1459340523 0.02579264383 0.05897316203 0.0679185286 0.05683483932 0.02981566382 -0.1268317776 -0.1528882099 -0.1499404557 -0.1023016078 -0.09425733486 -0.09350460425 -0.1039443954 -0.09908410836 -0.1410420206 0.07459328239 -0.107377331 0.08239153198 0.04438429103 0.06120004602 0.05041289646 0.07026547632 0.06846205157 -0.03318227607 -0.0520044294 0.0467193939 0.03175481181 0.03094169556 0.05000750226 0.03336334678 -0.01473890672 0.06963675093 0.09644922128 -0.04060805325 -0.03669327877 0.2193485024 0.1999359587 0.05145301781 -0.1276848605 0.03759977728 0.03452289049 0.414067389 0.390650576 0.466858707 0.911677853 0.2617183331 0.0691613037 -0.1069545572 -0.09952776645 -0.1233939416 -0.1496277558 -0.1104300883 -0.09888512767 -0.08601194527 -0.10285785 -0.08938620803 -0.04908219898 -0.04054870786 -0.1317547663 0.159746578 -0.09948853416 -0.1042472436 -0.122432832 -0.08929496227 -0.08553146934 -0.1410986059 -0.1500822901 -0.1358900385 -0.08694491201 -0.1079261192 -0.1137540761 -0.1328615751 --0.1252568753 -0.1353085239 0.1481856949 -0.13942345 0.1413409176 -0.003081680049 -0.03308584484 -0.128133654 0.03325334532 -0.008822724289 0.06560231195 0.03347246548 0.07505530434 -0.1248899205 0.09132102174 0.04763486904 0.1047292319 0.1256818908 0.09063092359 -0.06642439933 -0.08744063841 0.03452074685 -0.08564308884 -0.08553699285 -0.03730079073 -0.05606394962 -0.0474410782 -0.06926441825 0.0850622247 0.0931453209 0.09749755403 0.07797274499 -0.01084570721 -0.03144296104 -0.02948713807 -0.008760643901 0.203293552 0.1430726199 0.1618612885 0.1403350124 -0.08234598162 -0.08718667037 -0.07284501324 -0.07263384969 -0.09320779381 -0.09582465801 -0.1259911452 -0.1207882858 -0.1278491642 0.0724792312 0.08175199833 0.08525898452 0.03739060479 0.04687903052 -0.1273520199 -0.1300976007 -0.1364940048 -0.07864385134 -0.08873027931 -0.09855911092 -0.09225919769 -0.09218946203 -0.1277794972 0.06791765438 -0.1269888504 0.07120902858 0.02645954489 0.03659288988 0.02622354008 0.04980686302 0.03980638088 -0.0104355162 -0.008117529095 0.06576154773 0.04645156591 0.07226024578 0.05586050651 0.04716063029 -0.0582198712 0.09693059657 0.05120704805 -0.04989938595 -0.0415284188 0.1663639015 0.167841646 0.02104400106 -0.1331825354 0.02219020034 0.05304823749 0.2269337697 0.2885514784 0.2878596612 0.2617183331 0.9009682847 0.1051735367 -0.06708128241 -0.08519512593 -0.09259173438 -0.1412285891 -0.08246662089 -0.08373785343 -0.07047445612 -0.09543948385 -0.06655903201 -0.03315202779 -0.01703159933 -0.1186606911 0.2032212364 -0.07356625864 -0.07791757348 -0.107959651 -0.0876424412 -0.09363228911 -0.1487324835 -0.138921172 -0.1248448173 -0.05232758843 -0.08095611001 -0.1029883376 -0.1400798285 --0.1264900283 -0.1388257425 0.06074065633 -0.1317841203 0.07971243743 0.01213077201 0.002503652731 -0.1067223642 0.08984769033 -0.01619855878 0.1050108758 0.06888813951 0.1290766652 -0.1350725978 0.08517048213 0.1025529861 0.0758286648 0.0642077688 0.09884466655 -0.08036798767 -0.06373384933 -0.02220751798 -0.07198535756 -0.07237874364 -0.01042623315 -0.0193799626 -0.0312705432 -0.07793782318 0.09338014371 0.06322020153 0.07386625006 0.1005584717 -0.01729811161 0.002431037758 0.002871503788 0.01518859119 0.06824154069 0.03690893876 0.06511835667 0.06867259857 -0.06966031808 -0.08716254055 -0.07211854313 -0.07068662171 -0.07806642183 -0.08614905174 -0.147059995 -0.1412625969 -0.1369152748 0.07770528465 0.07141224722 0.08167735305 0.0882002242 0.08710234197 -0.1324701158 -0.1225959664 -0.145309553 -0.0492803251 -0.070832425 -0.06890701427 -0.0752176319 -0.07241944485 -0.1105374963 0.1394003253 -0.1334860778 0.1149162836 0.09480008933 0.08477236545 0.07964864566 0.1249747983 0.1311836465 -0.0012414127 -0.007064403467 0.08430560028 0.08377438508 0.06615811633 0.1008822714 0.0869361397 -0.03539209998 0.1051933286 0.117059875 -0.01995160716 -0.05069048506 0.06434367247 0.08477251534 0.07864615013 -0.1239963998 0.07376190695 0.07183809999 0.03590951045 0.07667484253 0.08072529569 0.0691613037 0.1051735367 1.012374318 -0.08689671036 -0.07214435819 -0.1098667602 -0.1356968528 -0.06774760328 -0.07929255228 -0.05179415649 -0.07369811191 -0.06516636898 -0.02669823025 -0.0342988507 -0.1219324617 0.07828364773 -0.06414513313 -0.06545579271 -0.07949837447 -0.0816958023 -0.08527901633 -0.1562182434 -0.1450616173 -0.1002809575 -0.009698279869 -0.06690520216 -0.08081726515 -0.125899148 -0.01920079426 0.03652102015 -0.07543300375 -0.003232950385 -0.0851278005 -0.01118801162 -0.00925541698 -0.003762833461 -0.07214455658 -0.007357772332 -0.1059919806 -0.06926014195 -0.09113976866 -0.009457699373 -0.1070770674 -0.09180139845 -0.06910946218 -0.07702119428 -0.07752551591 0.06337799759 0.03066842506 0.002523275902 0.07345091527 0.09273348865 0.02744324606 0.07089837713 0.08182843673 0.2616797601 -0.09724666509 -0.1109452323 -0.1129151751 -0.1049884254 0.0268760123 -0.02892563967 -0.02633755662 -0.009236011591 -0.0907198467 -0.08641560299 -0.1073136575 -0.1158412529 0.06512355875 0.05744850346 0.116538594 0.1379185833 0.07224265918 0.06503776814 0.0213624907 0.01121324279 -0.01066911528 -0.08019594369 -0.0845460629 -0.09164548334 -0.08408169413 -0.07288395378 0.02039088987 -0.00483812705 0.1564749722 0.002058881926 0.0454249855 0.04269196049 0.04238848145 0.2213385297 0.01488075179 -0.0860685562 0.006415044414 -0.09601378159 -0.07782682711 -0.07025647476 -0.09223326474 -0.07421777238 -0.09288205147 0.01392483953 -0.00780839858 -0.1127955421 -0.1163093348 -0.123278271 -0.1140332436 -0.1026787326 -0.05756716635 -0.09067200071 -0.09985692436 -0.03294581301 -0.05140295682 -0.09757641898 -0.0889237133 -0.05816120707 0.02160836272 -0.1192438995 -0.09058615099 -0.0940658636 -0.08962450213 -0.09091972895 -0.1069545572 -0.06708128241 -0.08689671036 1.078157289 0.2377894155 0.08737421428 0.01508358777 -0.003920486831 0.2800701715 0.1902936809 0.3044733779 0.2022640349 -0.01693877085 0.01124512955 -0.007720044618 -0.08143148845 0.07754408775 0.09687443303 0.2787204045 0.05873590765 0.04845337643 0.003558098999 -0.003761056252 0.009966656718 -0.04093233129 -0.007701083468 0.02389708697 0.01073262585 -0.005528366461 -0.002215936011 -0.08529122244 -0.01625641399 -0.1046293334 0.01571933508 0.05363824335 0.002446389713 -0.07483045817 -0.0103574891 -0.102029541 -0.06368965862 -0.09780855902 -0.002560557352 -0.08941025822 -0.08422427936 -0.07693230078 -0.09353823872 -0.0921035639 0.06318791634 0.04446459609 0.02581453328 0.06503175046 0.08585824965 0.02530660601 0.04406868286 0.0598152882 0.2219894696 -0.07626724839 -0.1003150268 -0.1016509093 -0.1134168105 0.02329491853 0.0165158545 0.01431897777 -0.005854997545 -0.08160323449 -0.09222019972 -0.1003791288 -0.1122039968 0.04479104274 0.06138470769 0.06032770345 0.05047002971 0.05417364536 0.05525137925 -0.02317590343 -0.01384347288 -0.008330677398 -0.08389908116 -0.08314590707 -0.108872816 -0.08474566165 -0.0657034085 -0.003595088948 -0.02041962581 0.1354919103 0.07390669709 0.09432009339 0.07650361072 0.07186832453 0.2244182145 0.001784114131 -0.08008208834 0.008916593878 -0.08631180796 -0.09332960019 -0.09776674952 -0.09096500545 -0.08587544644 -0.1015525063 0.02107152751 0.01563441681 -0.1015039117 -0.1121809559 -0.1086677186 -0.102550495 -0.102292931 -0.05218413264 -0.09057906005 -0.09375340835 -0.05554636772 -0.06005362673 -0.1041283688 -0.1079903377 -0.07641767935 0.01201292066 -0.106409821 -0.10138792 -0.08965822772 -0.09713083339 -0.08413672617 -0.09952776645 -0.08519512593 -0.07214435819 0.2377894155 1.074845202 0.06110426289 0.01932083481 0.03689884427 0.3025525598 0.2228861132 0.2921515935 0.2107503739 -0.003663246704 0.01110172791 -0.003512352015 -0.08744504762 0.1097809071 0.09805335844 0.307530881 0.04038503391 0.02706781101 -0.01722336 -0.01411665384 0.01760660646 -0.05391781679 0.03073291655 0.05417660025 0.01066130604 -0.07790150652 0.04609431961 -0.09790690775 0.1284182236 -0.08933545378 -0.09986729643 -0.0953188154 0.05584801107 -0.07730229147 -0.0963056668 -0.1093714065 -0.07915519378 -0.1173955065 0.07671299507 -0.1049228379 -0.0747842216 -0.1111294668 -0.08096762254 -0.1054802156 0.04626248228 0.09480190708 0.09269826943 0.06631921303 0.07199900035 0.1277792391 0.1640175453 0.1350370699 0.01612993039 -0.05872940852 -0.09110084038 -0.08118085533 -0.06169323734 -0.09056896617 -0.09400050992 -0.09184720403 -0.1010154915 -0.08484402691 -0.08397357978 -0.1083726952 -0.09082326735 0.0404468598 0.05871890742 0.1073979468 0.08148121981 0.02865900835 0.05148086519 0.118192676 0.09932387134 0.1099200134 -0.06340947935 -0.09645425141 -0.1124450247 -0.105411684 -0.08597430195 0.1364596711 0.2041391385 0.2859411628 0.05964103876 0.0433069765 0.04983696719 0.0551108593 0.02839365598 0.1511978124 -0.1054811983 0.1545407519 -0.1264800097 -0.1128483644 -0.110508237 -0.112401502 -0.09888834516 -0.1052951984 -0.08884639519 -0.07535253168 -0.07425812019 -0.1014850735 -0.09272175269 -0.1001798758 -0.1015542907 -0.0183118734 -0.09296648141 -0.1295752861 -0.01185265697 -0.02225013625 -0.1005022201 -0.1024983938 -0.1011151117 0.2422539128 -0.08720409163 -0.08489508262 -0.08609583883 -0.1104944649 -0.1230888952 -0.1233939416 -0.09259173438 -0.1098667602 0.08737421428 0.06110426289 1.024584105 0.1356403419 -0.02154853834 0.09560109192 -0.006434846545 0.07587999779 0.007826719703 -0.01059393218 0.03118066157 0.06527494553 -0.08598455924 0.1257984738 0.1365038554 0.03861826841 0.05154301502 0.04617658099 0.1226847898 0.08423952653 0.1489361656 0.01151731925 -0.02437909638 0.06435736159 0.07172783775 -0.2497735615 0.2231160177 -0.1499705495 0.2897590193 -0.1223658894 -0.09759492701 -0.1037298225 0.1869498824 -0.1142643464 -0.1113008755 -0.1487471059 -0.1104513396 -0.1465189807 0.3559757023 -0.1428434483 -0.1409148803 -0.1365970285 -0.1323745496 -0.1304679796 -0.007702823609 0.01182301475 -0.01541633711 0.006603512615 0.01863593795 -0.01492514991 -0.008412003361 -0.007477032865 -0.01108335514 -0.1314995498 -0.1501204191 -0.1432431297 -0.1515429615 -0.1126676501 -0.1330070377 -0.1337363295 -0.1095945707 -0.1598284805 -0.1428223203 -0.137426247 -0.1589269618 -0.007580163323 -0.01632176763 0.002234734049 -0.02292330625 0.004819274885 0.02079835961 0.3697678332 0.311109707 0.3573765555 -0.11958242 -0.1293503655 -0.1393130621 -0.1221609499 -0.1183837878 0.2959066428 0.32593792 0.1112185194 0.008787990108 0.01548425534 -0.0006148144639 0.01449030231 0.02703983315 0.3275181105 -0.1346033997 0.3654759896 -0.1484347765 -0.1305746019 -0.1271826512 -0.1345078077 -0.1537151669 -0.1451540359 -0.1238798896 -0.1202187838 -0.1497981317 -0.1599912456 -0.1245606779 -0.1312337662 -0.1413000379 0.1310506946 -0.1439639107 -0.1474454041 0.09425719686 0.1287140832 -0.1448474156 -0.1231721892 -0.113438468 0.4362694785 -0.1191376984 -0.1254953989 -0.1497044987 -0.1515087722 -0.1416474596 -0.1496277558 -0.1412285891 -0.1356968528 0.01508358777 0.01932083481 0.1356403419 1.176356353 0.03964610764 0.02770194106 0.04080435702 0.03399204525 0.08559622516 0.078835249 -0.004944409132 0.3529458134 -0.1527815079 9.749416104e-05 -0.009382235116 0.0004403351212 -0.002801213789 0.01433503616 0.3239470205 0.2339894605 0.2977874198 0.2215912799 0.04033972468 0.006568606052 0.2398701085 -0.04618894983 0.0411151026 -0.08853466216 0.04453702736 -0.08302389772 0.07308094426 0.06459733883 0.4453767595 -0.06774905244 0.03176201783 -0.08022026432 -0.06075586981 -0.07685395244 0.0689061046 -0.0813493493 -0.06772260114 -0.07799047276 -0.08428738585 -0.07125114965 0.05826834778 0.06741584095 -0.0362709008 0.0203674161 -0.002980739676 -0.03911793445 -0.07075801314 -0.07867674441 0.03140988033 -0.09834047709 -0.1158554039 -0.1019671457 -0.1143719681 0.01243537071 0.00410180135 0.004549167022 0.01181109278 -0.07760405403 -0.08713806491 -0.1020839342 -0.08211110579 0.02156358512 0.0455066389 0.04833819674 0.03226369183 -0.02083388167 -0.01022659746 0.07612742392 0.04928307629 0.04555498543 -0.06327016451 -0.06015321496 -0.08746565308 -0.06435646899 -0.05695940174 0.098660662 0.1262479645 -0.01721331724 0.06350663749 0.03286635889 0.03014837527 0.02999167242 0.00913053103 0.08470233002 -0.05587195966 0.04360851255 -0.06547088501 -0.1028647685 -0.08314219209 -0.07595609748 -0.09213783771 -0.07274239953 0.05078150108 0.04384014714 -0.08471711111 -0.07159671186 -0.07459598878 -0.09006452135 -0.1022092167 -0.02195626621 -0.08894176089 -0.09841151537 -0.02737963364 0.01097943276 -0.09046853843 -0.1132316065 -0.08275470917 0.02728901799 -0.1156912109 -0.09617841527 -0.1062333506 -0.08334930482 -0.1020699091 -0.1104300883 -0.08246662089 -0.06774760328 -0.003920486831 0.03689884427 -0.02154853834 0.03964610764 0.9571125207 0.01607130227 0.0304708884 0.002303224029 0.06514170296 -0.01731492989 -0.04172044373 0.08511730479 -0.08902614592 0.003507920271 -0.01441001924 0.02092237017 0.01763381202 0.01340767006 0.01526509802 0.2295605784 0.153647004 -0.01427431515 0.8316135771 0.02384013628 0.1499149813 -0.01454063186 0.01457493454 -0.07864237218 -0.001846997739 -0.09347202848 -0.01442133768 0.02005475664 -0.009406227471 -0.06152181087 -0.0270608167 -0.08550248199 -0.06621100819 -0.08182556048 -0.001044738301 -0.08506157063 -0.0787494891 -0.07443231957 -0.09113787015 -0.08687477204 0.04997055952 0.06475820454 0.02540668457 0.05576528809 0.04666170208 0.0319477975 0.0670321587 0.04949445256 0.2433325125 -0.08163522247 -0.1005073344 -0.1127751738 -0.09122351659 -0.0257114102 -0.03816236787 -0.03704054654 -0.03849108287 -0.09068968456 -0.09029806723 -0.1016890716 -0.09953343407 0.04310790926 0.05811664903 0.08742684119 0.0808324163 0.05741986639 0.05042274837 0.0003527019401 -0.005423183615 -0.01430218157 -0.08081790097 -0.0815434472 -0.1002748856 -0.09411131555 -0.08311764971 0.01402391407 0.001886871056 0.1461136128 0.04315377291 0.07304246049 0.06160084473 0.04535347597 0.2290180237 0.01455532801 -0.09300549542 0.01639008605 -0.09696658588 -0.07999674114 -0.08409438284 -0.09227842475 -0.06912780382 -0.09078702221 0.0373246256 0.03519106934 -0.1048375521 -0.1108012029 -0.1036620979 -0.1056441954 -0.103554638 -0.05596795537 -0.08963987373 -0.09388407431 -0.06612009441 -0.07088540272 -0.09832744519 -0.1016887217 -0.06299309691 0.0293137309 -0.1076010931 -0.1011331718 -0.08857350031 -0.1026878011 -0.09568634743 -0.09888512767 -0.08373785343 -0.07929255228 0.2800701715 0.3025525598 0.09560109192 0.02770194106 0.01607130227 1.012842646 0.2053812553 0.5491547143 0.192186749 -0.03131234471 -0.01479667977 -0.005516370997 -0.09993772203 0.07714350323 0.1181443977 0.2334172725 0.02907284729 0.03094578397 -0.003900618246 -0.01846862609 0.01132573735 -0.04990866757 0.00158064577 0.05089167169 0.01798923893 -0.0631349183 0.1212502806 -0.08250941679 0.1151228464 -0.0744417398 -0.04360478711 -0.0466584402 0.05399246629 0.004343315535 -0.05504072216 -0.08089149222 -0.01779430244 -0.05576849422 0.03593538782 -0.06963813805 -0.07034365009 -0.0180038885 -0.02684051071 -0.01372792827 -0.004179837976 -0.00413878292 -0.01848688147 0.006666149271 -0.01232449811 -0.01326639361 -0.02345074385 -0.0313369759 0.2283453974 -0.0494368999 -0.07445530394 -0.06313450713 -0.06730281202 -0.04670887399 -0.04471129177 -0.04586519392 -0.05843054876 -0.05937133255 -0.07339255412 -0.07236398822 -0.07513864885 -0.01484996229 -0.02332455082 0.003587833167 -0.00218572309 -0.01950332936 -0.04104000551 0.03986421747 0.02732129002 0.01347356723 -0.01094522118 -0.03851045356 -0.06674482362 -0.05701831694 -0.06782354055 0.04300798875 0.03728922621 0.01304518184 0.006362654272 0.003174686185 0.01682405289 -0.0179003408 0.2403734238 0.03072379983 -0.05211565992 0.02329611782 -0.06682783486 -0.06120796821 -0.0731861279 -0.04737695371 -0.06419059101 -0.04696961943 -0.04798383777 -0.03883282793 -0.05459802909 -0.07239504837 -0.07076337214 -0.0725596739 -0.06272879103 -0.03243002654 -0.06229363381 -0.09216673036 -0.03689479722 -0.02536357525 -0.08743408791 -0.07915251931 -0.05147791707 0.0411621613 -0.07208584281 -0.06420047146 -0.06472664712 -0.08166130347 -0.08082077475 -0.08601194527 -0.07047445612 -0.05179415649 0.1902936809 0.2228861132 -0.006434846545 0.04080435702 0.0304708884 0.2053812553 1.039024022 0.2022491295 0.2324242519 0.009022454843 -0.02704531315 0.04220158368 -0.07960092261 -0.02418308523 -0.006884787563 0.190901034 -0.03227400259 -0.02344008813 0.09753473661 0.1074616275 0.07432875643 0.004419263854 0.02659604733 -0.03339656605 0.07229451458 -0.009792150877 0.01724702564 -0.08477054142 -0.01045984245 -0.09351060896 -0.02850099433 0.005502007186 -0.01647727871 -0.05908152453 -0.01406022315 -0.1061643317 -0.05589936363 -0.084041141 0.003228793149 -0.1077957657 -0.088131326 -0.08832437995 -0.09936144422 -0.1060140065 0.04145001906 0.0392498909 0.03022038159 0.06733597247 0.07361989647 0.05659338131 0.07769787912 0.04988755792 0.2290957049 -0.08301598164 -0.1065378376 -0.1155122358 -0.09006938442 -0.02032392416 -0.02535612727 -0.02624035125 -0.02246709423 -0.08853374232 -0.106840824 -0.1139096776 -0.1097239715 0.0522996449 0.03894074177 0.08733094303 0.08933494146 0.05591507905 0.05107794598 -0.004873155256 -0.0008577005418 -0.01483375897 -0.07453475333 -0.08549267481 -0.1073601081 -0.09326707189 -0.08545326858 0.01458884008 0.002906229554 0.1419250728 0.0537200914 0.08120573517 0.05778161421 0.03531465809 0.2386878363 0.01264303421 -0.08513612271 0.01991382035 -0.08690164634 -0.08783600121 -0.08799826782 -0.08131619706 -0.063642642 -0.07708178866 -0.004187230361 0.007901926535 -0.1007575526 -0.1048694393 -0.09739646833 -0.1059847206 -0.09389870673 -0.05461951907 -0.09922579725 -0.09964631612 -0.05663021023 -0.07543775532 -0.1070211001 -0.1028467784 -0.06895918537 0.01876927677 -0.08865338617 -0.09331542765 -0.08813451042 -0.08437252341 -0.08839915822 -0.10285785 -0.09543948385 -0.07369811191 0.3044733779 0.2921515935 0.07587999779 0.03399204525 0.002303224029 0.5491547143 0.2022491295 1.075931063 0.1961958808 -0.02921782287 0.01269431835 0.004757147747 -0.1095381918 0.0786283123 0.1406973446 0.2453499481 0.03020582378 0.02023398984 -0.0159224325 -0.02536972098 0.001925903019 -0.04212816053 -0.01073777528 0.06266543206 0.01630707829 -0.04456947734 0.04783858101 -0.06902253693 0.009658279166 -0.0674901823 0.04685192246 0.03207755135 0.05633105627 -0.05400569771 -0.003130353789 -0.09624583315 -0.05798156072 -0.09534633705 0.05675084561 -0.08204292865 -0.1003031267 -0.07657432581 -0.07578362529 -0.08585259003 0.03069428516 0.03708101924 -0.03636104672 0.02958353007 0.05383697184 -0.03425734406 -0.05285952636 -0.03632248705 0.2576046035 -0.08592818303 -0.1003647871 -0.108248444 -0.1077858874 -0.004118314458 -0.02891796762 -0.02761545911 -0.03098044607 -0.0741096944 -0.07247523965 -0.07101281504 -0.06351577222 0.02797007706 0.03622280525 0.01700049434 0.01083550225 0.01568838683 -0.004612882013 0.04118588081 0.08626225277 0.05003814005 -0.06459192734 -0.05233892526 -0.09302703606 -0.08142695341 -0.06929291018 0.03691009185 0.03142494704 0.0135314328 0.07378460664 0.05783364441 0.05568917355 0.02469864651 0.2420555181 0.01864010689 -0.0731264845 0.05073331331 -0.07457183364 -0.06166855187 -0.07109295159 -0.05986603069 -0.0997737537 -0.09761367516 -0.001710069513 -0.002944854738 -0.09139959495 -0.10946284 -0.1179265077 -0.09891735978 -0.1030880412 0.02436190247 -0.07636480237 -0.09407290283 0.003086546658 -0.008759114831 -0.09234380525 -0.08512822699 -0.03812618221 0.04245153331 -0.09346241149 -0.09530714432 -0.0719211599 -0.09312026084 -0.0948051824 -0.08938620803 -0.06655903201 -0.06516636898 0.2022640349 0.2107503739 0.007826719703 0.08559622516 0.06514170296 0.192186749 0.2324242519 0.1961958808 1.057071307 0.003183095338 -0.0205757285 0.08424163611 -0.09539361333 0.002857646166 -0.01288854429 0.2051464361 -0.002373554075 0.002905484338 0.0272468925 0.02885423657 0.02675666944 0.009732854415 0.06074742373 0.001270788158 0.05717640422 -0.07154842604 0.06123750702 -0.05379655073 0.0585768709 -0.01370114802 -0.05902567476 -0.03548853022 0.0323752688 -0.03806557691 -0.0454820822 -0.02315148424 -0.02804403211 -0.03356121616 0.1106412813 -0.0247088015 -0.05930866406 -0.05189781666 -0.03776211561 -0.04130316335 -0.01239647987 -0.01932005212 -0.03452352459 -0.01516415426 -0.0207018026 -0.01148699773 -0.02135156629 -0.02235101636 -0.004376540278 -0.02913156066 -0.0359936551 -0.04402598106 -0.0356334233 -0.064385327 -0.0496835565 -0.05405704168 -0.05127062851 -0.04576599679 -0.05322243219 -0.03897035762 -0.04649365898 -0.02535570298 -0.02932194031 -0.03731055655 -0.03258156572 -0.02237707669 -0.03453164387 0.057073326 0.0621817079 0.07875805794 -0.01882967401 -0.01587465588 0.1425092648 0.06964080166 0.1121189836 0.05180465499 0.02781101626 -0.01852751793 -0.02770572655 -0.04120691833 -0.01707405433 -0.02642939331 -0.005846573511 0.0300132131 -0.01478571821 0.05892774419 0.01154034871 -0.02775411834 -0.02467708213 -0.03298173764 -0.03836909598 -0.04062627742 -0.0612249441 -0.06982881974 -0.05882961673 -0.05418326871 -0.06281403934 -0.05448691937 -0.05734743538 -0.001148871819 -0.0269661618 -0.0487117261 0.002482137674 0.001460794227 0.1131660417 0.1527481275 -0.0156925095 0.04567609527 -0.04892951058 -0.04188842859 -0.02915214806 -0.02607259881 -0.06185014695 -0.04908219898 -0.03315202779 -0.02669823025 -0.01693877085 -0.003663246704 -0.01059393218 0.078835249 -0.01731492989 -0.03131234471 0.009022454843 -0.02921782287 0.003183095338 0.8781614549 -0.01474630274 0.03767692445 -0.05208796288 -0.02461989235 -0.02947053646 0.005392370575 -0.02741444941 -0.01255145644 0.07256349166 0.04905278272 0.05933123998 0.2165169871 -0.02076546804 -0.01848606807 0.1629847058 --0.01477844438 -0.005957885087 -0.05043874768 -0.01692659487 -0.009324560498 -0.05867047292 -0.05791145756 -0.02314723137 -0.02871938608 -0.07728696105 -0.0109961865 -0.03911854044 -0.05082953793 -0.006460107076 -0.01824026041 0.04074196071 -0.0575378839 -0.07187175338 -0.04535251612 0.05415308081 0.04382205708 0.03234151289 0.02079183859 0.08443455456 0.06195865651 0.04595224817 0.05528809246 0.03484659353 -0.02812194636 -0.05583996441 -0.04698311943 -0.07308892322 -0.08504510962 -0.1040257632 -0.1029978441 -0.09058788797 -0.02043649713 -0.008553101873 0.02829939952 -0.02637563302 0.04784481484 0.02369533133 0.04924764319 0.06243762848 0.2270867991 0.2220877693 -0.003719146755 -0.002412909102 -0.004287002188 -0.02019201137 -0.02965447194 -0.04809576106 -0.02404671717 -0.04422903241 -0.03990594394 -0.02782594084 0.1683144983 0.05290605921 0.05406829121 0.04002035276 0.06099286417 0.00547586372 -0.01849647169 -0.003322367891 -0.01316706952 -0.01890228947 -0.06155881266 -0.02939023051 -0.02493371199 -0.05178704047 -0.03060320688 -0.06225821487 -0.07896436318 -0.02843731069 -0.01788124038 -0.01032506267 0.01928075278 -0.008344183731 -0.02178423013 -0.01999259619 -0.03778098482 -0.03348405101 -0.02561441094 -0.03251673426 -0.03193652377 -0.02909261783 -0.02824408027 -0.0164978256 -0.02723475202 -0.02601621418 -0.02921714014 -0.03632206802 -0.04054870786 -0.01703159933 -0.0342988507 0.01124512955 0.01110172791 0.03118066157 -0.004944409132 -0.04172044373 -0.01479667977 -0.02704531315 0.01269431835 -0.0205757285 -0.01474630274 0.917800396 -0.01984624053 -0.03033561937 0.01552634623 0.02619268303 0.06774664179 0.05638830085 0.04847217957 -0.03682565331 -0.03186837913 -0.02229302812 -0.01769575426 -0.04098622163 0.07946624057 -0.01424529711 -0.2166792165 0.2192198585 -0.1413818906 0.1922219691 -0.1222777267 -0.1040619647 -0.1006183944 0.3424684891 -0.1063674299 -0.1034618239 -0.1388157732 -0.1168225873 -0.1259942861 0.35911712 -0.1297323136 -0.1322191724 -0.1323331646 -0.1345805199 -0.1306440884 -0.02748765874 -0.01067749251 -0.02172866471 -0.01158486432 0.00119066776 -0.005537690574 -0.0192452745 -0.008890926773 -0.006626607241 -0.1311617441 -0.1399079003 -0.1366838281 -0.1478731858 -0.09879148669 -0.1139921855 -0.1108913745 -0.1024421545 -0.1364279957 -0.1333261263 -0.1245045312 -0.1234873685 -0.003599087708 -0.03300126651 -0.008925969106 -0.02157829449 -0.01021055162 -0.007687388414 0.4124955949 0.3692528457 0.4064736732 -0.122012705 -0.1249660467 -0.1397742619 -0.1164954687 -0.1076477617 0.2323632678 0.2347857609 0.08679037696 0.005182329331 -0.004323358046 -0.003229750576 0.02010556798 0.008738636001 0.2485989615 -0.1120983036 0.2318698074 -0.1274496834 -0.1207501947 -0.1108200114 -0.1290315302 -0.1348085449 -0.1302771494 -0.1107528695 -0.110678918 -0.1341088772 -0.141300693 -0.1288785617 -0.120589738 -0.1391757151 0.2844269744 -0.1470924644 -0.1155220565 0.2419881013 0.185105027 -0.1434217909 -0.1414735735 -0.08566223766 0.2062195287 -0.1254491372 -0.1154499147 -0.1218054796 -0.1211830427 -0.1183535047 -0.1317547663 -0.1186606911 -0.1219324617 -0.007720044618 -0.003512352015 0.06527494553 0.3529458134 0.08511730479 -0.005516370997 0.04220158368 0.004757147747 0.08424163611 0.03767692445 -0.01984624053 1.172579933 -0.1321169641 -0.001409046981 -0.01959222867 -0.003371889958 -0.005517536419 -0.00335849663 0.2324879273 0.3062713222 0.228043206 0.1442083103 0.08678370154 0.009125755165 0.237465903 --0.1357661537 -0.143524853 0.2167293859 -0.1375218788 0.09021896311 -0.00306058241 -0.05272356143 -0.1285551356 0.06198392559 -0.02866933699 0.1035647776 0.09858191195 0.1565707602 -0.1528642821 0.09456068782 0.06819072614 0.08060832792 0.09634788449 0.08916670067 -0.1024190219 -0.07980237432 0.02908838517 -0.1007807603 -0.1027968787 -0.05258917776 -0.04092697304 -0.03853579254 -0.09096396039 0.08738543921 0.05910788834 0.0800716138 0.07403876444 -0.07223378566 -0.05560099276 -0.05483196934 -0.05889930811 0.2189747787 0.1128364771 0.1407042238 0.1417081071 -0.09259125842 -0.1046889968 -0.08931845841 -0.09986134763 -0.1016157026 -0.09225556391 -0.1445107503 -0.140998684 -0.1357474703 0.05722177886 0.05072412362 0.0621893567 0.07510815942 0.04477729527 -0.1180654279 -0.1436907763 -0.1385887474 -0.09537399339 -0.09250732162 -0.09404142614 -0.09659360438 -0.08048045697 -0.1280110717 0.08591234663 -0.1357325414 0.08704848082 0.04263297477 0.07363723343 0.07742730747 0.1022386029 0.09996822148 -0.03529322465 -0.03529058336 0.1453604125 0.1741219736 0.1607439453 0.0824014904 0.1587173401 -0.01092106385 0.07995616546 0.119627584 -0.004473910254 0.01143402353 0.08388393818 0.08899192775 0.05375965249 -0.1221794244 0.09953255489 0.1635433882 0.2635028092 0.2060182231 0.2324654038 0.159746578 0.2032212364 0.07828364773 -0.08143148845 -0.08744504762 -0.08598455924 -0.1527815079 -0.08902614592 -0.09993772203 -0.07960092261 -0.1095381918 -0.09539361333 -0.05208796288 -0.03033561937 -0.1321169641 0.9013137419 -0.1064064892 -0.09143498217 -0.1041639667 -0.1002122438 -0.1041665554 -0.1344939885 -0.1509885861 -0.1277304416 -0.09680321741 -0.08667123747 -0.1148693389 -0.1464322694 -0.003533807955 0.009750527927 -0.0888582548 -0.02801743733 -0.1069330833 0.07055582224 0.1047672909 -0.01294366344 -0.104084127 0.04920898724 -0.1066425556 -0.1105365805 -0.08693106599 -0.0004301704632 -0.1011184639 -0.09979892603 -0.08646936147 -0.08184371811 -0.1017565893 0.1059148363 0.07181071626 0.05269197782 0.1159075045 0.09108504636 0.04655238751 0.117405054 0.08058344803 0.05634606828 -0.07893218457 -0.09734199158 -0.08936454656 -0.1136835733 0.1131124716 0.07076998493 0.07254055626 0.1081274734 -0.07879738494 -0.09623150681 -0.1103266676 -0.09415334638 0.075178928 0.09603178737 0.1313777442 0.1407639907 0.1021170798 0.158386864 -0.02772473235 -0.005808400059 -0.008187609534 -0.06368198116 -0.07043988046 -0.08877875493 -0.08425092019 -0.07745672841 -0.00663601 -0.004328226003 0.1544306089 0.06611019854 0.05758219435 0.07840611644 0.06323371084 0.01873709604 -0.000202039441 -0.06229922198 0.004310409982 -0.07079003616 -0.09039223016 -0.1021444435 -0.0840198055 -0.08797269842 -0.1008862068 0.04722137886 0.05723072163 -0.1201927647 -0.1251102993 -0.1311809561 -0.1244757758 -0.1240769767 -0.04751822292 -0.07847785485 -0.08673550998 -0.03296569552 -0.05224745352 -0.08277419917 -0.08144204018 -0.07078802082 -0.001788073024 -0.1166595363 -0.1026149212 -0.09264911124 -0.08223636087 -0.1097750029 -0.09948853416 -0.07356625864 -0.06414513313 0.07754408775 0.1097809071 0.1257984738 9.749416104e-05 0.003507920271 0.07714350323 -0.02418308523 0.0786283123 0.002857646166 -0.02461989235 0.01552634623 -0.001409046981 -0.1064064892 0.9909119412 0.4684348531 0.07080061063 0.1268011444 0.1355194563 0.0004555779764 -0.0136194915 -0.006908209057 -0.03180022667 -0.003868227114 0.1383506567 0.01097677067 --0.01046614667 -0.01001439041 -0.085109167 -0.03072625006 -0.09229721925 0.0879078296 0.06498182218 -0.01603337726 -0.08334035174 0.01120227328 -0.1072103108 -0.08393584321 -0.0743416022 -0.01845622351 -0.1016176304 -0.07061159383 -0.05896209618 -0.06572611873 -0.06189286381 0.09919872961 0.07207381258 0.02339739301 0.09436493961 0.07442750301 0.06799970732 0.1351034463 0.08624958849 0.06498093617 -0.07514169934 -0.06957516645 -0.07738494063 -0.0840656232 0.07358100304 0.04462916085 0.046197217 0.06399659585 -0.07146924255 -0.08629485797 -0.101312753 -0.08981656647 0.05852264304 0.1264230403 0.1529808705 0.1574461328 0.1265352 0.136561166 -0.02462179621 -0.01191489056 -0.02106172162 -0.05919434186 -0.06619798259 -0.07181626373 -0.08475576561 -0.07370945768 -0.01052777232 -0.00377516377 0.1617305007 0.06139772729 0.0420893256 0.08074590922 0.06290378848 0.004840856028 -0.01115907788 -0.06966910988 -0.01884229701 -0.07304072637 -0.06412944029 -0.08739036328 -0.06938064398 -0.08300351648 -0.09222715979 0.04920497067 0.02246008328 -0.1093282331 -0.1032699209 -0.1083166168 -0.115846258 -0.1072330008 -0.07107834154 -0.06861529205 -0.09342375932 -0.06352425974 -0.07400865347 -0.09589444289 -0.08645040382 -0.06225679296 -0.01262804023 -0.08723427243 -0.08585544823 -0.1005438452 -0.08259682058 -0.1022442668 -0.1042472436 -0.07791757348 -0.06545579271 0.09687443303 0.09805335844 0.1365038554 -0.009382235116 -0.01441001924 0.1181443977 -0.006884787563 0.1406973446 -0.01288854429 -0.02947053646 0.02619268303 -0.01959222867 -0.09143498217 0.4684348531 0.9921472237 0.07229160743 0.09103387954 0.09525699478 -0.01130531586 -0.01783636693 -0.01234642029 -0.02523452876 -0.01847578171 0.07561047033 0.004075278699 -0.01690316736 0.0129172967 -0.09869520766 0.001607214923 -0.1035888851 0.04536918237 0.0555447032 0.01487712826 -0.07229545053 -0.002793858297 -0.1116895395 -0.08245420128 -0.1096647879 0.002438718674 -0.110783514 -0.1053345746 -0.0884981454 -0.09654668815 -0.09998948306 0.07322664799 0.059581597 0.03508918248 0.08683558046 0.1428954148 -0.0003367802099 0.001051413213 0.003177662358 0.2272553797 -0.1036289366 -0.117514511 -0.1303246601 -0.1104366269 0.02917724995 0.005346396728 0.005458196347 -0.01591386656 -0.1011681637 -0.1211665244 -0.1289299807 -0.131454278 0.08172040747 0.06856666124 0.07024321521 0.08977019743 0.1092437134 0.09866165936 0.005204318063 -0.002408834849 0.006094641103 -0.0897727362 -0.07633685615 -0.1177716296 -0.09137056839 -0.1026770354 0.003724280041 0.002552562488 0.1691350438 0.04858943452 0.05980272057 0.06298295268 0.07397263691 0.2557804843 0.01857257687 -0.09435386228 0.0279815357 -0.1064861474 -0.09239036471 -0.1030630654 -0.1080408906 -0.098733934 -0.1056080477 0.003033217821 0.02122491216 -0.1037041945 -0.1021955945 -0.1243873031 -0.1205427355 -0.106543861 -0.05239491606 -0.111643268 -0.09698134143 -0.04840321684 -0.06207501527 -0.1211947293 -0.1069181323 -0.07770306554 0.01604154243 -0.1292213087 -0.1098605761 -0.103819081 -0.1038301024 -0.1105603432 -0.122432832 -0.107959651 -0.07949837447 0.2787204045 0.307530881 0.03861826841 0.0004403351212 0.02092237017 0.2334172725 0.190901034 0.2453499481 0.2051464361 0.005392370575 0.06774664179 -0.003371889958 -0.1041639667 0.07080061063 0.07229160743 1.046720133 0.2047571546 0.165016496 -0.003153315454 -0.001450902334 0.01593440667 -0.04036962065 0.01350893922 0.1845143922 0.007221425588 --0.03356706382 -0.03641036342 -0.08813135235 -0.04099598484 -0.07442612115 0.07344491774 0.1006660332 -0.04842825216 -0.1011180871 0.1454657001 -0.124654739 -0.09175111757 -0.07879322441 -0.02238612604 -0.1197063849 -0.119560721 -0.09446799557 -0.09232933255 -0.08669079697 0.09317301505 0.07599635178 0.03913825446 0.1353527887 0.2286809512 -0.005362883708 -0.002677761829 -0.001099300836 0.03494170838 -0.08385784311 -0.1174801256 -0.09831796331 -0.1187504556 0.1756079961 0.1314754338 0.1344778651 0.1428331063 -0.08394876467 -0.09767492038 -0.1030414005 -0.1046409258 0.08308399331 0.09946473728 0.06444820574 0.09765274601 0.1633545068 0.1314893083 -0.009847331409 -0.03221134585 -0.01518476977 -0.09267848593 -0.1163952973 -0.07890920071 -0.06955111439 -0.07892694537 -0.0323687769 -0.03448068547 0.2011300099 0.08682242743 0.09204892458 0.1001573035 0.07231019778 0.07565619222 -0.03028419751 -0.09181668575 0.005264653052 -0.09677241055 -0.08833395138 -0.08392098651 -0.08675908475 -0.08669828029 -0.0809902411 0.03354635468 0.0257789976 -0.123016787 -0.107224096 -0.1108202001 -0.1368342279 -0.1321366787 -0.03682165153 -0.09879957575 -0.07877749714 -0.0522493691 -0.06968208243 -0.09065568682 -0.07175215527 -0.07921324351 -0.02386835864 -0.1146219137 -0.107477989 -0.09309613571 -0.07164654746 -0.08358890668 -0.08929496227 -0.0876424412 -0.0816958023 0.05873590765 0.04038503391 0.05154301502 -0.002801213789 0.01763381202 0.02907284729 -0.03227400259 0.03020582378 -0.002373554075 -0.02741444941 0.05638830085 -0.005517536419 -0.1002122438 0.1268011444 0.09103387954 0.2047571546 1.056915024 0.5600807623 -0.02976376259 -0.03808984937 -0.03578390271 -0.03664776243 0.01733429552 0.3792725464 -0.0354278431 --0.01748459932 -0.01941751081 -0.09699274658 -0.02587009079 -0.07207506332 0.09305294498 0.04793974619 -0.02668112944 -0.07935275045 0.08101802362 -0.1078088586 -0.07524277997 -0.08490366354 0.001463833684 -0.1185790291 -0.1003839276 -0.07131230492 -0.08251978795 -0.08319838008 0.1202202509 0.08397690755 0.03929664724 0.1197551495 0.1506062528 0.0103286051 0.01986139278 0.02565383125 0.0437640079 -0.08395966904 -0.1248997519 -0.1051429185 -0.1185501753 0.1373375025 0.1015015345 0.1025454999 0.1300344207 -0.07853081077 -0.09599033806 -0.1050341949 -0.1108913388 0.05518223349 0.1204603283 0.05857214078 0.06593218795 0.1250947354 0.1207030897 0.0108948539 -0.01209046026 0.007856006112 -0.08390731006 -0.09802135972 -0.08005087938 -0.07230179702 -0.07531024471 -0.02350951192 -0.02424423372 0.1856992198 0.1042220239 0.08432276772 0.08666558795 0.0934242228 0.07358691177 -0.01471302721 -0.0903453663 0.01770393864 -0.1068548386 -0.08272101056 -0.08515897978 -0.09916831315 -0.09496047395 -0.09242332937 0.02676961591 0.03458748425 -0.1183436741 -0.1144002829 -0.121015703 -0.1345478479 -0.133246333 -0.02335687548 -0.09269500344 -0.1026883828 -0.03035350847 -0.04054454545 -0.09120228111 -0.08009325019 -0.0631172474 -0.0173350223 -0.1016808403 -0.1102440549 -0.09792425361 -0.08296989073 -0.0866904721 -0.08553146934 -0.09363228911 -0.08527901633 0.04845337643 0.02706781101 0.04617658099 0.01433503616 0.01340767006 0.03094578397 -0.02344008813 0.02023398984 0.002905484338 -0.01255145644 0.04847217957 -0.00335849663 -0.1041665554 0.1355194563 0.09525699478 0.165016496 0.5600807623 0.9948811246 -0.01857663585 -0.02923274386 -0.01796629151 -0.0277444469 0.01321459577 0.3737820058 -0.005251333288 -0.5340640585 0.5224299142 -0.1322606412 0.5650192674 -0.1293046309 -0.1289737386 -0.1237524121 0.1667477083 -0.1311639821 -0.1206396179 -0.1366758343 -0.1362232158 -0.1435348241 0.2251253121 -0.1291067707 -0.1585209389 -0.1377067632 -0.1400049461 -0.1439686694 -0.004789872972 -0.004913796391 -0.02539871876 -0.01352109543 -0.009464031438 -0.03085940551 -0.04136374412 -0.02892953264 0.007841964218 -0.1436176063 -0.1399517229 -0.1471295263 -0.1701477611 -0.123724358 -0.146571627 -0.1470588044 -0.1314582672 -0.1282411774 -0.1260363313 -0.1276381102 -0.1100231719 0.01011401362 -0.01730181987 -0.00739551521 -0.02735188368 -0.001803379292 0.003256813286 0.2851480709 0.2814805932 0.2789812158 -0.1326551015 -0.1515125928 -0.1216171092 -0.1263434821 -0.09953291599 0.3337612752 0.370184242 0.09940072822 -0.007255240308 -0.0100972337 -0.01675195512 0.009182871086 0.0181764706 0.3548022464 -0.1213140244 0.3085671527 -0.1334463182 -0.1483438184 -0.1475607747 -0.1380161665 -0.1293360036 -0.1351079226 -0.09867552757 -0.1261302945 -0.1568644058 -0.15582884 -0.1360425305 -0.1410961651 -0.1487070689 0.05125071058 -0.1300589551 -0.1349607464 0.05721322614 0.06267682525 -0.1401941499 -0.1312812429 -0.1269683687 0.4343821499 -0.1404728812 -0.1562053574 -0.1305456182 -0.1338791815 -0.1449071791 -0.1410986059 -0.1487324835 -0.1562182434 0.003558098999 -0.01722336 0.1226847898 0.3239470205 0.01526509802 -0.003900618246 0.09753473661 -0.0159224325 0.0272468925 0.07256349166 -0.03682565331 0.2324879273 -0.1344939885 0.0004555779764 -0.01130531586 -0.003153315454 -0.02976376259 -0.01857663585 1.151957767 0.6237698721 0.2948117378 0.1402609293 0.02035964392 -0.01506316916 0.3238045878 -0.3539872986 0.3966085786 -0.145971227 0.4346932831 -0.118392493 -0.123641125 -0.1100081276 0.5847066978 -0.1337348909 -0.1053220604 -0.1340962665 -0.13939425 -0.1356437999 0.205302958 -0.1242627363 -0.1633927337 -0.143994875 -0.1484114384 -0.1490690383 -0.01022257584 -0.001852571464 -0.03130931635 -0.0006071026063 -0.01297135628 -0.03361536555 -0.0589915714 -0.03689266877 0.002103282329 -0.1495262369 -0.1608932564 -0.1541982701 -0.1780908767 -0.1171148423 -0.1376657867 -0.1362207017 -0.1209757817 -0.1354712511 -0.1215856381 -0.1222432624 -0.1217618612 -0.004061363503 -0.01257353852 -0.00695484463 -0.01668387088 -0.01797036509 -0.01810411268 0.2881704158 0.2802429592 0.2695326116 -0.1256731701 -0.1442054553 -0.1255065165 -0.1209638153 -0.1192780166 0.3801336486 0.3617180858 0.09384574367 -0.007536143731 -0.002678823356 -0.01543458384 -0.008392571318 0.006238630024 0.3436407684 -0.1276967563 0.2562587273 -0.1411723895 -0.146113088 -0.1411150589 -0.1444567486 -0.1408699705 -0.1435954431 -0.1051904921 -0.1157769904 -0.1528780338 -0.1498254855 -0.1347254825 -0.1468759528 -0.1567583393 0.04883373617 -0.1328814432 -0.157810761 0.04913109125 0.05800157754 -0.165695724 -0.1592083222 -0.1181305918 0.3260311834 -0.1413056214 -0.1539312797 -0.1405847556 -0.1335736376 -0.1555695189 -0.1500822901 -0.138921172 -0.1450616173 -0.003761056252 -0.01411665384 0.08423952653 0.2339894605 0.2295605784 -0.01846862609 0.1074616275 -0.02536972098 0.02885423657 0.04905278272 -0.03186837913 0.3062713222 -0.1509885861 -0.0136194915 -0.01783636693 -0.001450902334 -0.03808984937 -0.02923274386 0.6237698721 1.154991145 0.3807463767 0.1279941477 0.232424452 -0.01106291103 0.3606979959 -0.2522760745 0.2595645921 -0.1295251066 0.3611980089 -0.1286944338 -0.08264914807 -0.09108399611 0.3877652239 -0.1091145028 -0.09693037142 -0.1347881442 -0.1140112321 -0.1217978195 0.2012487431 -0.1276128635 -0.1345027041 -0.1401989855 -0.1407023045 -0.1379903731 -0.03378975827 0.004076252558 -0.001729107861 0.01332400138 -0.01063062439 -0.001846026649 -0.02248378535 -0.01250272443 -0.0002616414904 -0.127007012 -0.1483265264 -0.1483651623 -0.1492263462 -0.1092386947 -0.1220927906 -0.1209225145 -0.1190108305 -0.1114816311 -0.1401421227 -0.1390045807 -0.1256780654 -0.03526239597 -0.0308138037 -0.01203585351 -0.02798513695 -0.01943308406 -0.01446913269 0.2623402716 0.2112272875 0.2085810085 -0.1222392752 -0.1129826742 -0.1467594381 -0.1252307676 -0.1169684851 0.5202083499 0.390262839 0.06321916555 -0.02233316498 -0.0229940641 -0.002661400182 -0.009440859966 0.01194616843 0.4039034894 -0.119325791 0.3296679428 -0.1324636327 -0.1370855086 -0.13197747 -0.1275486335 -0.1218126708 -0.1272570524 -0.1027248829 -0.09721999023 -0.1380178852 -0.1364230176 -0.1393539434 -0.1371866491 -0.139155158 0.04893600837 -0.1566151598 -0.1416165818 0.02096806263 0.02513146236 -0.1567451329 -0.1531040635 -0.1125789026 0.561676114 -0.1469665752 -0.1417599219 -0.1222511888 -0.1260396375 -0.1353458003 -0.1358900385 -0.1248448173 -0.1002809575 0.009966656718 0.01760660646 0.1489361656 0.2977874198 0.153647004 0.01132573735 0.07432875643 0.001925903019 0.02675666944 0.05933123998 -0.02229302812 0.228043206 -0.1277304416 -0.006908209057 -0.01234642029 0.01593440667 -0.03578390271 -0.01796629151 0.2948117378 0.3807463767 1.179195678 0.08497189236 0.1561792713 -0.02331647159 0.2638715017 -0.09673255451 0.08097242721 -0.08361356848 0.1005780934 -0.01208064801 -0.05647918204 -0.0599667517 0.07396652986 -0.05412295009 -0.0546108382 -0.03314760033 -0.04174366443 -0.04140634169 0.08910699122 -0.0297480447 -0.0571937306 -0.06789531353 -0.04932150325 -0.03462459383 -0.03673667534 -0.03533897048 -0.04681945159 -0.05675007922 -0.02015930791 -0.02852890835 -0.02788167086 -0.02766652498 -0.02248458723 -0.02974309034 -0.04950061476 -0.04714157659 -0.04208696771 -0.07017272548 -0.07954509847 -0.0803949705 -0.05915513229 -0.08213927432 -0.0649623813 -0.05760705021 -0.06532435541 -0.04032815983 -0.04572109028 -0.03487364355 -0.04310186459 -0.0257207889 -0.02558481803 0.1238113437 0.1036458177 0.1032253622 -0.001868935106 -0.01517880956 0.1064132721 0.1116770524 0.09872552078 0.06811452263 0.09475544679 -0.002973806793 -0.02992901358 -0.04370148091 -0.02875618753 -0.03306250322 -0.02046392741 0.07431900073 -0.02520525585 0.08554468788 -0.007215497057 -0.03660427732 -0.03568216954 -0.04349012841 -0.05829847718 -0.04625816867 -0.06753994688 -0.06124853585 -0.06528797475 -0.04753670703 -0.06048843117 -0.06227834352 -0.0738493723 0.0490695351 -0.02687319193 -0.04725143744 0.05227401326 0.04787958789 0.066019108 0.1387623152 -0.0418291874 0.07287390024 -0.03226738919 -0.04798225084 -0.06297799997 -0.04971705847 -0.07620184722 -0.08694491201 -0.05232758843 -0.009698279869 -0.04093233129 -0.05391781679 0.01151731925 0.2215912799 -0.01427431515 -0.04990866757 0.004419263854 -0.04212816053 0.009732854415 0.2165169871 -0.01769575426 0.1442083103 -0.09680321741 -0.03180022667 -0.02523452876 -0.04036962065 -0.03664776243 -0.0277444469 0.1402609293 0.1279941477 0.08497189236 0.9547688841 -0.01461290143 -0.03283442319 0.09286882372 -0.04891384322 0.0435771114 -0.08841144777 0.04862101518 -0.07985896217 0.07257577068 0.06547031224 0.447947375 -0.06697888886 0.02809563787 -0.08019135366 -0.06025456523 -0.07884231046 0.06773912471 -0.07795307659 -0.06795076353 -0.07615611104 -0.08227941389 -0.07192417998 0.05737916868 0.06629766551 -0.03905849972 0.01541500059 -0.007402274844 -0.04331690974 -0.0750801333 -0.08021964151 0.02716122524 -0.09829543937 -0.1110157816 -0.09733161604 -0.1146587931 0.01327463917 0.003009868952 0.002665073758 0.009214069059 -0.07786897282 -0.08442239869 -0.1010156507 -0.07969835374 0.0184127805 0.04533555077 0.04715609989 0.02752536062 -0.02178522278 -0.00950484794 0.07585863837 0.05001368937 0.04774940373 -0.06034479385 -0.0586483412 -0.08780015374 -0.06127524917 -0.0545621364 0.09846130186 0.1278702016 -0.02246711097 0.06181086412 0.02979972789 0.02872707663 0.02834560435 0.003879833256 0.08603638258 -0.05565484467 0.04284226063 -0.06741355452 -0.102153554 -0.08084099003 -0.07521190221 -0.09187502316 -0.07278184909 0.04884436968 0.03971665467 -0.08255377702 -0.07027765082 -0.07063115801 -0.08894154841 -0.1008522506 -0.02181494569 -0.08971966045 -0.09946889075 -0.02713738485 0.01217102198 -0.0908459456 -0.1127362068 -0.08171369601 0.03024531639 -0.1140150904 -0.09602176108 -0.1045345337 -0.08276848148 -0.1011619987 -0.1079261192 -0.08095611001 -0.06690520216 -0.007701083468 0.03073291655 -0.02437909638 0.04033972468 0.8316135771 0.00158064577 0.02659604733 -0.01073777528 0.06074742373 -0.02076546804 -0.04098622163 0.08678370154 -0.08667123747 -0.003868227114 -0.01847578171 0.01350893922 0.01733429552 0.01321459577 0.02035964392 0.232424452 0.1561792713 -0.01461290143 1.009690702 0.02512320847 0.1472971312 --0.01831894126 -0.02848161737 -0.1002533622 -0.01752815359 -0.08711495647 0.0504618907 0.1056698414 -0.007466392903 -0.1092106184 0.1161943359 -0.1155122783 -0.08632227788 -0.07785898902 -0.002469321028 -0.1125314981 -0.1045323905 -0.0899749326 -0.09511225213 -0.09788384619 0.1159050792 0.08958332751 0.03215888193 0.1009401279 0.1862831876 0.003195970233 0.009220304393 0.01275755243 0.02490243598 -0.0905681975 -0.1130986653 -0.1097584481 -0.1244734085 0.1192937331 0.09779916247 0.09724592475 0.1131234996 -0.0827214469 -0.09514349844 -0.1016396142 -0.1009516896 0.0755707846 0.08869426362 0.08745213023 0.08792425004 0.1377723407 0.1646585049 0.001655785728 -0.001681553802 0.008656397877 -0.09158688769 -0.1031176942 -0.07896871757 -0.08155993539 -0.05569462953 -0.03558746764 -0.0195898851 0.2200034878 0.1046885791 0.09029822827 0.1166407881 0.08067148573 0.02423653469 -0.01227884198 -0.08486506302 0.01624268105 -0.08665023363 -0.09707847611 -0.1044259362 -0.08986306108 -0.07528407628 -0.08468760467 0.04579324499 0.04394091703 -0.1304006638 -0.1105779772 -0.1179388413 -0.1273174782 -0.1258677946 -0.0451621325 -0.08594122959 -0.1053058957 -0.03743693351 -0.05662863015 -0.08639213199 -0.07223567687 -0.0758511405 -0.02522059075 -0.1012036831 -0.1099649103 -0.1138046183 -0.09139043105 -0.09843894053 -0.1137540761 -0.1029883376 -0.08081726515 0.02389708697 0.05417660025 0.06435736159 0.006568606052 0.02384013628 0.05089167169 -0.03339656605 0.06266543206 0.001270788158 -0.01848606807 0.07946624057 0.009125755165 -0.1148693389 0.1383506567 0.07561047033 0.1845143922 0.3792725464 0.3737820058 -0.01506316916 -0.01106291103 -0.02331647159 -0.03283442319 0.02512320847 1.109989334 0.002977235382 -0.3173682377 0.367463872 -0.1305825944 0.4037436224 -0.1130413109 -0.09818863321 -0.06588503477 0.3502386921 -0.1101173414 -0.1001069189 -0.1367831353 -0.1072808106 -0.1259943315 0.3936035221 -0.1038424925 -0.1242889067 -0.1201973418 -0.1243484687 -0.1417866291 -0.01112950863 -0.004144491074 -0.02174848045 -0.01421826516 -0.007792927349 -0.01777346994 -0.01914676899 -0.01567937346 0.01410748052 -0.1485333876 -0.1427997998 -0.152519837 -0.1644619548 -0.08962592978 -0.1186421024 -0.1202760258 -0.1098011319 -0.1339571122 -0.1237712896 -0.1428448719 -0.1351476245 0.02853869169 -0.02214456372 0.02141462767 0.01715429248 -0.01599559234 -0.008372672196 0.26565398 0.2300805436 0.2489581696 -0.1151836459 -0.1177836912 -0.1289697293 -0.1175113498 -0.1063671458 0.2409349061 0.2496379686 0.1034745945 0.0003863253244 0.002062186328 0.01982428187 0.01513028175 0.005403420565 0.2319892399 -0.1093926589 0.2257111508 -0.1295827029 -0.1187719748 -0.1137042102 -0.1154943662 -0.1171999451 -0.1285729275 -0.08483675318 -0.09072421731 -0.1474470738 -0.1563397116 -0.1476846516 -0.1427755804 -0.1522498322 0.05788929426 -0.1318577905 -0.1428769236 0.0590248186 0.07418906785 -0.1577959635 -0.1615338991 -0.08378397545 0.2457328434 -0.1236089604 -0.1334074576 -0.1236913548 -0.1419950539 -0.1465453505 -0.1328615751 -0.1400798285 -0.125899148 0.01073262585 0.01066130604 0.07172783775 0.2398701085 0.1499149813 0.01798923893 0.07229451458 0.01630707829 0.05717640422 0.1629847058 -0.01424529711 0.237465903 -0.1464322694 0.01097677067 0.004075278699 0.007221425588 -0.0354278431 -0.005251333288 0.3238045878 0.3606979959 0.2638715017 0.09286882372 0.1472971312 0.002977235382 1.180225756 diff --git a/test/shunit2-2.0.3/Makefile b/test/shunit2-2.0.3/Makefile deleted file mode 100644 index effbcca..0000000 --- a/test/shunit2-2.0.3/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# $Id$ - -PROG=shunit2 - -BIN_DIR=$(PWD)/bin -BUILD_DIR=$(PWD)/build -DIST_DIR=$(PWD)/dist -LIB_DIR=$(PWD)/lib -SHARE_DIR=$(PWD)/share -SRC_DIR=$(PWD)/src -TEST_DIR=$(PWD)/test -TMP_DIR=$(PWD)/tmp - -DOCBOOK_BUILD_DIR=$(BUILD_DIR)/docbook -DOCBOOK_SHARE_DIR=$(SHARE_DIR)/docbook - -DOCBOOK_SRC_DIR=$(SRC_DIR)/docbook -EXAMPLES_SRC_DIR=$(SRC_DIR)/examples -SHELL_SRC_DIR=$(SRC_DIR)/shell -TEST_SRC_DIR=$(SRC_DIR)/test - -HTML_XSL=$(SHARE_DIR)/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl - -all: build docs - -build: build-prep - cp -p $(SHELL_SRC_DIR)/$(PROG) $(BUILD_DIR) - -build-clean: - rm -fr $(BUILD_DIR) - -build-prep: - @mkdir -p $(BUILD_DIR) - -docs: docs-transform-shelldoc docs-transform-docbook - -docs-prep: - @mkdir -p $(DOCBOOK_BUILD_DIR) - @echo "Preparing documentation for parsing" - @isoDate=`date "+%Y-%m-%d"`; \ - find $(DOCBOOK_SRC_DIR) -name "*.xml" |\ - while read f; do \ - bn=`basename $$f`; \ - sed -e "s/@@ISO_DATE@@/$$isoDate/g" $$f >$(DOCBOOK_BUILD_DIR)/$$bn; \ - done - -docs-extract-shelldoc: docs-prep - @echo "Extracting the ShellDoc" - @$(BIN_DIR)/extractDocs.pl $(SHELL_SRC_DIR)/$(PROG) >$(BUILD_DIR)/$(PROG)_shelldoc.xml - -docs-transform-shelldoc: docs-prep docs-extract-shelldoc - @echo "Parsing the extracted ShellDoc" - @xsltproc $(SHARE_DIR)/resources/shelldoc.xslt $(BUILD_DIR)/$(PROG)_shelldoc.xml >$(DOCBOOK_BUILD_DIR)/functions.xml - -docs-transform-docbook: docs-docbook-prep docs-prep - @echo "Parsing the documentation with DocBook" - @xsltproc $(HTML_XSL) $(DOCBOOK_BUILD_DIR)/$(PROG).xml >$(BUILD_DIR)/$(PROG).html - -docs-docbook-prep: - @if [ ! -d "$(DOCBOOK_SHARE_DIR)/docbook-xml" \ - -o ! -d "$(DOCBOOK_SHARE_DIR)/docbook-xsl" ]; \ - then \ - echo "Preparing DocBook structure"; \ - $(BIN_DIR)/docbookPrep.sh "$(DOCBOOK_SHARE_DIR)"; \ - fi - -test: test-prep - @echo "executing $(PROG) unit tests" - ( cd $(TEST_DIR); $(TEST_SRC_DIR)/run-test-suite ) - -test-clean: - rm -fr $(TEST_DIR) - -test-prep: build test-clean - @mkdir -p $(TEST_DIR) - cp -p $(TEST_SRC_DIR)/test* $(TEST_DIR) - cp -p $(TEST_SRC_DIR)/run-test-suite $(TEST_DIR) - cp -p $(BUILD_DIR)/$(PROG) $(TEST_DIR) - -dist: dist-clean build docs - @mkdir $(DIST_DIR) - cp -p $(BUILD_DIR)/$(PROG) $(DIST_DIR) - cp -p $(BUILD_DIR)/$(PROG).html $(DIST_DIR) - -clean: build-clean test-clean - rm -fr $(TMP_DIR) - -dist-clean: clean - rm -fr $(DIST_DIR) diff --git a/test/shunit2-2.0.3/bin/docbookPrep.sh b/test/shunit2-2.0.3/bin/docbookPrep.sh deleted file mode 100755 index eb7c270..0000000 --- a/test/shunit2-2.0.3/bin/docbookPrep.sh +++ /dev/null @@ -1,97 +0,0 @@ -#! /bin/sh -# $Id$ - -XML_VERSION='4.4' -XML_FILE="docbook-xml-${XML_VERSION}" -XML_URL="http://www.docbook.org/xml/${XML_VERSION}/${XML_FILE}.zip" - -XSL_VERSION='1.72.0' -XSL_FILE="docbook-xsl-${XSL_VERSION}" -XSL_URL="http://downloads.sourceforge.net/docbook/${XSL_FILE}.tar.bz2" - -#----------------------------------------------------------------------------- -# do no edit below here -#----------------------------------------------------------------------------- - -PATH="${PATH}:${MY_DIR}" -PWD=${PWD:-`pwd`} - -MY_BASE=`basename "$0"` -MY_DIR=`dirname "$0"` - -# load shlib -. "${MY_DIR}/../lib/sh/shlib" - -BASE_DIR=`shlib_relToAbsPath "${MY_DIR}/.."` -DL_DIR="${BASE_DIR}/tmp" -DOCBOOK_DIR="${BASE_DIR}/share/docbook" - -CURL_OPTS='-C - -Os' -WGET_OPTS='-cq' - -METHOD_NONE=0 -METHOD_WGET=1 -METHOD_CURL=2 - -get_url() -{ - url=$1 - case ${method} in - ${METHOD_CURL}) ${curl} ${CURL_OPTS} "${url}" ;; - ${METHOD_WGET}) ${wget} ${WGET_OPTS} "${url}" ;; - esac -} - -# determine method -method=${METHOD_NONE} -wget=`which wget` -[ $? -eq 0 ] && method=${METHOD_WGET} -curl=`which curl` -[ $? -eq 0 -a ${method} -eq ${METHOD_NONE} ] && method=${METHOD_CURL} -if [ ${method} -eq ${METHOD_NONE} ]; then - echo "unable to locate wget or curl. cannot continue" - exit 1 -fi - -# create download dir -mkdir -p "${DL_DIR}" - -# get the docbook xml files -echo 'Docbook XML' -echo ' downloading' -cd ${DL_DIR} -get_url "${XML_URL}" -if [ -f "${DL_DIR}/${XML_FILE}.zip" ]; then - echo ' extracting' - xml_dir="${DOCBOOK_DIR}/docbook-xml/${XML_VERSION}" - rm -fr "${xml_dir}" - mkdir -p "${xml_dir}" - cd "${xml_dir}" - unzip -oq "${DL_DIR}/${XML_FILE}.zip" - cd .. - rm -f current - ln -s "${XML_VERSION}" current -else - echo "error: unable to extract (${XML_FILE}.zip)" >&2 - exit 1 -fi - -# get the docbook xslt files -echo 'Docbook XSLT' -echo ' downloading' -cd ${DL_DIR} -get_url "${XSL_URL}" -if [ -f "${DL_DIR}/${XSL_FILE}.tar.bz2" ]; then - echo ' extracting' - xsl_dir="${DOCBOOK_DIR}/docbook-xsl" - mkdir -p "${xsl_dir}" - cd "${xsl_dir}" - rm -fr ${XSL_VERSION} - bzip2 -dc "${DL_DIR}/${XSL_FILE}.tar.bz2" |tar xf - - mv ${XSL_FILE} ${XSL_VERSION} - rm -f current - ln -s "${XSL_VERSION}" current -else - echo "error: unable to extract (${XSL_FILE}.tar.bz2)" >&2 - exit 1 -fi diff --git a/test/shunit2-2.0.3/bin/extractDocs.pl b/test/shunit2-2.0.3/bin/extractDocs.pl deleted file mode 100755 index a803526..0000000 --- a/test/shunit2-2.0.3/bin/extractDocs.pl +++ /dev/null @@ -1,40 +0,0 @@ -#! /usr/bin/perl -# $Id$ - -if(@ARGV != 1) { - print "usage: $0 sourceFile\n"; - exit; -} - -$sourceFile = $ARGV[0]; - -# -# read in the source file -# -$rslt = open(FILE, $sourceFile) - || die "could not open file ($sourceFile)"; - -$inComment = 0; -while() { - next if /^[^#]/; - s/^# //; - s/^#//; - - if(/^\/\*\*/) { - $inComment = 1; - next; - } - if(/\*\/$/) { - $inComment = 0; - next; - } - - if ($inComment == 1) { print $_ }; - if ($inComment == 0 && /\/\/\*/) { - @line = split /\/\/\*/, $_, 2; - $line[1] =~ s/^ //; - print $line[1]; - } -} - -close(FILE); diff --git a/test/shunit2-2.0.3/bin/which b/test/shunit2-2.0.3/bin/which deleted file mode 100755 index 9d7cc9f..0000000 --- a/test/shunit2-2.0.3/bin/which +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh -# $Id$ -# -# This is a simple implementation of the 'which' command for those OSes that -# don't have one. -# - -true; TRUE=$? -false; FALSE=$? - -showAll=${FALSE} - -# process command line flags -while getopts 'a' opt; do - case ${opt} in - a) showAll=${TRUE} - esac -done -shift `expr ${OPTIND} - 1` - -# exit if no arguments were given -[ $# -eq 0 ] && exit 1 - -command=$1 - -# search for command -out=`echo "${PATH}" |sed "s/:/\n/g" |\ -while read path; do - fullPath="${path}/${command}" - if [ -x "${fullPath}" ]; then - echo "${fullPath}" - [ ${showAll} -eq ${FALSE} ] && break - fi -done` -[ -z "${out}" ] && exit 1 -echo "${out}" diff --git a/test/shunit2-2.0.3/doc/CHANGES-2.0.txt b/test/shunit2-2.0.3/doc/CHANGES-2.0.txt deleted file mode 100644 index 97ea3db..0000000 --- a/test/shunit2-2.0.3/doc/CHANGES-2.0.txt +++ /dev/null @@ -1,68 +0,0 @@ -CHANGES WITH 2.0.4 - -Unset additional variables that were missed. - -Fixed off-by-one in exit value for scripts caught by the trap handler. - -The library did not fail gracefully when the 'od' command was not installed. - - -CHANGES WITH 2.0.3 - -Back ported the Makefile from 2.1.1pre that included changes to the -docs-docbook-prep target. - -Changed the test in assertFalse() so that any non-zero value registers as -false. (Credits to Bryan Larsen) - -Updated the testPartyLikeItIs1999() function in the Quick Start documentation. -The 'expected' and 'actual' values were swapped. (Credits to Richard Jensen) - -It was pointed out that the simple 'failed' message for a failed assert was not -only insufficient, it was nonstandard (when compared to JUnit) and didn't -provide the user with an expected vs actual result. The code was revised -somewhat to bring closer into alignment with JUnit (v4.3.1 specifically) so -that it feels more "normal". (Credits to Richard Jensen) - -As part of the JUnit realignment, it was noticed that fail*() functions in -JUnit don't actually do any comparisons themselves. They only generate a -failure message. Updated the code to match. - -Added self-testing unit tests. Kinda horkey, but they did find bugs during the -JUnit realignment. - -Fixed the code for returning from asserts as the return was being called before -the unsetting of variables occurred. (Credits to Mathias Goldau) - -The assert(True|False)() functions now accept an integer value for a -conditional test. A value of '0' is considered 'true', while any non-zero value -is considered 'false'. - -All public functions now fill use default values to work properly with the '-x' -shell debugging flag. - -Fixed the method of percent calculation for the report to get achieve better -accuracy. - - -CHANGES WITH 2.0.2 - -Fixed problem with fail(). The failure message was not properly printed. - -Reworked the Makefile so that the DocBook XML and XSLT files are properly -downloaded before parsing can continue. - - -CHANGES WITH 2.0.1 - -Fixed some really stupid mistakes with the fail* functions. They were doing the -exact opposite of what they were supposed to be doing. - - -CHANGES WITH 2.0.0 - -Made the first stand-alone release! - - -$Revision$ -vim:spell diff --git a/test/shunit2-2.0.3/doc/LGPL-2.1 b/test/shunit2-2.0.3/doc/LGPL-2.1 deleted file mode 100644 index b1e3f5a..0000000 --- a/test/shunit2-2.0.3/doc/LGPL-2.1 +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/test/shunit2-2.0.3/doc/README.txt b/test/shunit2-2.0.3/doc/README.txt deleted file mode 100644 index 538f4f4..0000000 --- a/test/shunit2-2.0.3/doc/README.txt +++ /dev/null @@ -1,153 +0,0 @@ -#------------------------------------------------------------------------------ -# SourceForge -# - -This project is stored on SourceForge as http://sf.net/projects/shunit2. The -source code can be accessed using the following information. - -* Subversion -$ svn co https://shunit2.svn.sourceforge.net/svnroot/shunit2/trunk/source shunit2 - -Subversion may also be browsed via a web browser at -http://svn.sourceforge.net/shunit2 - -#------------------------------------------------------------------------------ -# Making a release -# - -For these steps, it is assumed we are working with release 2.0.0. - -Steps: -* write release notes -* update version -* finish changelog -* check all the code in -* tag the release -* export the release -* create tarball -* md5sum the tarball and sign with gpg -* update website -* post to SourceForge and Freshmeat - -WRITE RELEASE NOTES - -This should be pretty self explainatory. Use one of the release notes from a -previous release as an example. - -To get the versions of the various shells, do the following: -Cygwin - bash: $ bash --version - ksh: actually pdksh - pdksh: look in the downloaded Cygwin directory -Linux - bash: $ bash --version - dash: look at installed version - ksh: $ ksh --version - pdksh: $ strings /bin/pdksh |grep 'PD KSH' - zsh: $ zsh --version -Solaris 10 - sh: not possible - bash: $ bash --version - ksh: $ strings /usr/bin/ksh |grep 'Version' - -UPDATE VERSION - -Edit the shunit2 source code, and change the version number in the comment, as -well as in the __SHUNIT_VERSION variable. Next, edit the -src/docbook/shunit2.xml file, edit the version in the element, and make -sure there is a revision section for this release. - -FINISH DOCUMENTATION - -Make sure that any remaning changes get put into the CHANGES-X.X.txt file. - -Finish writing the RELEASE_NOTES-X.X.X.txt. Once it is finished, run it through -the 'fmt' command to make it pretty. - -$ fmt -w 80 RELEASE_NOTES-2.0.0.txt >RELEASE_NOTES-2.0.0.txt.new -$ mv RELEASE_NOTES-2.0.0.txt.new RELEASE_NOTES-2.0.0.txt - -We want to have an up-to-date version of the documentation in the release, so -we'd better build it. - -$ pwd -.../shunit2/source/2.0 -$ make docs -... -$ cp -p build/shunit2.html doc -$ svn ci -m "" doc/shunit2.html - -CHECK IN ALL THE CODE - -This step is pretty self-explainatory - -TAG THE RELEASE - -$ pwd -.../shunit2/source -$ ls -2.0 2.1 -$ svn cp -m "Release 2.0.0" \ -2.0 https://shunit2.svn.sourceforge.net/svnroot/shunit2/tags/source/2.0.0 - -EXPORT THE RELEASE - -$ pwd -.../shunit2/builds -$ svn export \ -https://shunit2.svn.sourceforge.net/svnroot/shunit2/tags/source/2.0.0 \ -shunit2-2.0.0 - -CREATE TARBALL - -$ tar cfz ../releases/shunit2-2.0.0.tgz shunit2-2.0.0 - -MD5SUM THE TARBALL AND SIGN WITH GPG - -$ cd ../releases -$ md5sum shunit2-2.0.0.tgz >shunit2-2.0.0.tgz.md5 -$ gpg --default-key kate.ward@forestent.com --detach-sign shunit2-2.0.0.tgz - -UPDATE WEBSITE - -Again, pretty self-explainatory. Make sure to copy the MD5 and GPG signature -files. Once that is done, make sure to tag the website so we can go back in -time if needed. - -$ pwd -.../shunit2 -$ ls -source website -$ svn cp -m "Release 2.0.0" \ -website https://shunit2.svn.sourceforge.net/svnroot/shunit2/tags/website/20060916 - -Now, update the website. It too is held in Subversion, so ssh into SourceForge -and use 'svn up' to grab the latest version. - -POST TO SOURCEFORGE AND FRESHMEAT - -http://sourceforge.net/projects/shunit2/ -http://freshmeat.net/ - -#------------------------------------------------------------------------------ -# Related documentation -# - -Docbook XML - docbook-xml-4.4.zip - http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip - http://www.oasis-open.org/docbook/xml/4.4/docbook-xml-4.4.zip - docbook-xml-4.5.zip - http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip - -Docbook XSL - docbook-xsl-1.71.0.tar.bz2 - http://prdownloads.sourceforge.net/docbook/docbook-xsl-1.71.0.tar.bz2?download - docbook-xsl-1.71.1.tar.bz2 - http://downloads.sourceforge.net/docbook/docbook-xsl-1.71.1.tar.bz2?use_mirror=puzzle - -JUnit - http://www.junit.org - - -$Revision$ diff --git a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt b/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt deleted file mode 100644 index 947eea9..0000000 --- a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.0.txt +++ /dev/null @@ -1,71 +0,0 @@ -RELEASE NOTES FOR 2.0.0 - -This is the initial release of shunit2. It was originally included in log4sh -1.3.5 [http://log4sh.sourceforge.net/] as a unit testing framework for that -product. It has since grown table enough to warrant being released into the -wild on its own. - - -TESTED PLATFORMS - -This list of platforms comes from the latest version of log4sh as shunit2 is -used in the testing of log4sh on each of these platforms. - -Cygwin -+ bash 3.2.9(10) -+ pdksh 5.2.14 - -Linux -+ bash 3.1.17(1) -+ dash 0.5.3 -+ ksh 1993-12-28 -+ pdksh 5.2.14 -+ zsh 4.3.2 (does not work) - -Mac OS X 1.4.8 (Darwin 8.8) -+ bash 2.05b.0(1) -+ ksh 1993-12-28 - -Solaris 8 U3 (x86) -+ /bin/sh -+ bash 2.03.0(1) -+ ksh M-11/16/88i - -Solaris 10 U2 (sparc) -+ /bin/sh -+ bash 3.00.16(1) -+ ksh M-11/16/88i - -Solaris 10 U2 (x86) -+ /bin/sh -+ bash 3.00.16(1) -+ ksh M-11/16/88i - - -NEW FEATURES - -None. - - -CHANGES AND ENHANCEMENTS - -None. - - -BUG FIXES - -None. - - -DEPRECATED FEATURES - -None. - - -KNOWN BUGS AND ISSUES - -None. - - -$Revision$ -vim:spell diff --git a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt b/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt deleted file mode 100644 index 110a37a..0000000 --- a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.1.txt +++ /dev/null @@ -1,73 +0,0 @@ -RELEASE NOTES FOR 2.0.1 - -This release is mostly a brown-bag release. Not so nice for the second release -ever of the product, but that's what I get for trying to get something out -there that I hadn't fully looked through one last time. - - -TESTED PLATFORMS - -This list of platforms comes from the latest version of log4sh as shunit2 is -used in the testing of log4sh on each of these platforms. - -Cygwin -+ bash 3.2.9(10) -+ pdksh 5.2.14 - -Linux -+ bash 3.1.17(1) -+ dash 0.5.3 -+ ksh 1993-12-28 -+ pdksh 5.2.14 -+ zsh 4.3.2 (does not work) - -Mac OS X 1.4.8 (Darwin 8.8) -+ bash 2.05b.0(1) -+ ksh 1993-12-28 - -Solaris 8 U3 (x86) -+ /bin/sh -+ bash 2.03.0(1) -+ ksh M-11/16/88i - -Solaris 10 U2 (sparc) -+ /bin/sh -+ bash 3.00.16(1) -+ ksh M-11/16/88i - -Solaris 10 U2 (x86) -+ /bin/sh -+ bash 3.00.16(1) -+ ksh M-11/16/88i - - -NEW FEATURES - -None. - - -CHANGES AND ENHANCEMENTS - -The documentation regarding the assertTrue() and assertFalse() functions was -updated to reflect their proper usage. They are shell test condition evaluators -(e.g. "[1 -eq 2]") rather than simple 0/1 comparators. - - -BUG FIXES - -The fail*() functions were doing the exact opposite of what they were supposed -to be doing. They have been fixed. - - -DEPRECATED FEATURES - -None. - - -KNOWN BUGS AND ISSUES - -None. - - -$Revision$ -vim:spell diff --git a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt b/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt deleted file mode 100644 index e7bcad6..0000000 --- a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.2.txt +++ /dev/null @@ -1,71 +0,0 @@ -RELEASE NOTES FOR 2.0.2 - -This is solely a bug-fix release. - - -TESTED PLATFORMS - -This list of platforms comes from the latest version of log4sh as shUnit2 is -used in the testing of log4sh on each of these platforms. - -Cygwin -+ bash 3.2.9(10) -+ pdksh 5.2.14 - -Linux -+ bash 3.1.17(1) -+ dash 0.5.3 -+ ksh 1993-12-28 -+ pdksh 5.2.14 -+ zsh 4.3.2 (does not work) - -Mac OS X 1.4.8 (Darwin 8.8) -+ bash 2.05b.0(1) -+ ksh 1993-12-28 - -Solaris 8 U3 (x86) -+ /bin/sh -+ bash 2.03.0(1) -+ ksh M-11/16/88i - -Solaris 10 U2 (sparc) -+ /bin/sh -+ bash 3.00.16(1) -+ ksh M-11/16/88i - -Solaris 10 U2 (x86) -+ /bin/sh -+ bash 3.00.16(1) -+ ksh M-11/16/88i - - -NEW FEATURES - -None. - - -CHANGES AND ENHANCEMENTS - -None. - - -BUG FIXES - -The fail() function did not output the optional failure message. - -Fixed the Makefile so that the DocBook XML and XSLT files would be downloaded -before parsing can continue. - - -DEPRECATED FEATURES - -None. - - -KNOWN BUGS AND ISSUES - -None. - - -$Revision$ -vim:spell diff --git a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt b/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt deleted file mode 100644 index 7e12684..0000000 --- a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.3.txt +++ /dev/null @@ -1,60 +0,0 @@ -RELEASE NOTES FOR 2.0.3 - -This release incorporates a realignment with the JUnit 4 code. Asserts now -provide better failure messages, and the failure functions no longer perform -tests. - -See the CHANGES-2.0.txt file for a full list of changes. - - -TESTED PLATFORMS - -This list of platforms comes from the latest version of log4sh as shUnit2 is -used in the testing of log4sh on each of these platforms. - -Cygwin -- untested - -Linux -- bash 3.2.13(1) -- dash 0.5.3 -- ksh 1993-12-28 -- pdksh 5.2.14 - -Mac OS X -- untested -Solaris 8 -- untested -Solaris 10 -- untested - - -NEW FEATURES - -None. - - -CHANGES AND ENHANCEMENTS - -The internal test in assertFalse() was changed so that any non-zero value is -considered false, rather than any only values equal to 1. - -The assertTrue() and assertFalse() functions now accept an integer value for a -conditional test. A value of '0' is considered 'true', while any non-zero value -is considered 'false'. - -Self-testing unit tests were added. - - -BUG FIXES - -All asserts now properly unset their variables. - - -DEPRECATED FEATURES - -None. - - -KNOWN BUGS AND ISSUES - -Functions do not properly test for an invalid number of arguments. - - -vim:spell diff --git a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt b/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt deleted file mode 100644 index 64fb417..0000000 --- a/test/shunit2-2.0.3/doc/RELEASE_NOTES-2.0.4.txt +++ /dev/null @@ -1,51 +0,0 @@ -RELEASE NOTES FOR 2.0.4 - -This is a minor bugfix release. - -See the CHANGES-2.0.txt file for a full list of changes. - - -TESTED PLATFORMS - -This list of platforms comes from the latest version of log4sh as shUnit2 is -used in the testing of log4sh on each of these platforms. - -Cygwin -- untested - -Linux -- bash 3.2.13(1) -- dash 0.5.3 -- ksh 1993-12-28 -- pdksh 5.2.14 - -Mac OS X -- untested -Solaris 8 -- untested -Solaris 10 -- untested - - -NEW FEATURES - -None. - - -CHANGES AND ENHANCEMENTS - -None. - - -BUG FIXES - -The library no longer fails when the 'od' command is not present. - - -DEPRECATED FEATURES - -None. - - -KNOWN BUGS AND ISSUES - -Functions do not properly test for an invalid number of arguments. - - -vim:spell diff --git a/test/shunit2-2.0.3/doc/TODO.txt b/test/shunit2-2.0.3/doc/TODO.txt deleted file mode 100644 index 7fd6314..0000000 --- a/test/shunit2-2.0.3/doc/TODO.txt +++ /dev/null @@ -1,5 +0,0 @@ -Make it possible to execute a single test by passing the name of the test on -the command line - - -$Revision$ diff --git a/test/shunit2-2.0.3/doc/contributors.txt b/test/shunit2-2.0.3/doc/contributors.txt deleted file mode 100644 index 69da654..0000000 --- a/test/shunit2-2.0.3/doc/contributors.txt +++ /dev/null @@ -1,10 +0,0 @@ -The original author of shunit2 is Kate Ward. The following people have -contributed in some way or another to shunit2. - -Bryan Larsen -Kevin Van Horn -Mathias Goldau -Richard Jensen -Rob Holland - -$Revision$ diff --git a/test/shunit2-2.0.3/doc/design_doc.txt b/test/shunit2-2.0.3/doc/design_doc.txt deleted file mode 100644 index 2849e55..0000000 --- a/test/shunit2-2.0.3/doc/design_doc.txt +++ /dev/null @@ -1,54 +0,0 @@ -Design Doc for shUnit2 -====================== - -shUnit is based upon JUnit. The initial ideas for the script came from the book -"Pragmatic Unit Testing - In Java with JUnit" by Andrew Hunt and David Thomas. - -The script was written to perform unit testing for log4sh. log4sh had grown -enough that it was becoming difficult to easily test and and verify that the -tests passed for the many different operating systems on which it was being -used. - -The functions in shUnit are meant to match those in JUnit as much as possible -where shell allows. In the initial version, there will be no concept of -exceptions (as normal POSIX shell has no concept of them) but attempts to trap -problems will be done. - -Programatic Standards ---------------------- - -* SHUNIT_TRUE - public global constant -* __SHUNIT_SHELL_FLAGS - private global constant -* __shunit_oldShellFlags - private global variable - -* assertEquals - public unit test function -* shunit_publicFunc - public shUnit function; can be called from parent unit - test script -* _shunit_privateFunc - private shUnit function; should not be called from - parent script. meant for internal use by shUnit - -* _su_myVar - variable inside a public function. prefixing with '_su_' to - reduce the chances that a variable outside of shUnit will be overridden. -* _su__myVar - variable inside a private function. prefixing with '_su__' to - reduce the chances that a variable in a shUnit public function, or a variable - outside of shUnit will be overridden. - -List of functions ------------------ - -assertTrue([message,] boolean) -assertFalse([message,] boolean) -fail([message]) -assertEquals([message,] expected, actual) -#isEquals(expected, actual) -#assertArrayEquals([message,] expecteds, actuals) -#isArray(expected) -assertNotNull([message,] object) -assertNull([message,], object) -assertSame([message,], expected, actual) -assertNotSame([message,], unexpected, actual) -failSame(message) -failNotSame([message,] expected, actual) - -.. $Revision$ -.. vim:syntax=rst diff --git a/test/shunit2-2.0.3/doc/shunit2.html b/test/shunit2-2.0.3/doc/shunit2.html deleted file mode 100644 index b3c1e83..0000000 --- a/test/shunit2-2.0.3/doc/shunit2.html +++ /dev/null @@ -1,218 +0,0 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>shUnit2

shUnit2 version 2.0.3

Kate Ward


-            
-          

2007-07-12

Revision History
Revision 2.0.32007-07-12Kate Ward <kate.ward@forestent.com>
Revision 2.0.22007-04-22Kate Ward <kate.ward@forestent.com>
Revision 2.0.12007-02-21Kate Ward <kate.ward@forestent.com>
Revision 2.0.02007-02-20Kate Ward <kate.ward@forestent.com>

Abstract

shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc.


List of Tables

3.1. asserts
3.2. failures
3.3. suites

Chapter 1. Introduction

shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc.

shUnit2 was originally developed to provide a consistent testing solution for log4sh, a shell based logging framework similar to log4j. During the development of that product, the problem of having things work just fine under one shell (/bin/bash on Linux to be specific), and then not working under another shell (/bin/sh on Solaris), kept coming up. Although there were several simple tests ran, they were not adaquate and did not catch very many corner cases. The decision was finally made to write a proper unit test framework after after multiple brown-bag releases were made.

Tested Operating Systems

Tested Shells

  • Bourne Shell (sh)

  • BASH - GNU Bourne Again SHell (bash)

  • DASH (dash)

  • Korn Shell (ksh)

  • pdksh - Public Domain Korn Shell (pdksh)

See the appropriate Release Notes (doc/RELEASE_NOTES-X.X.X.txt) for this release for the actual versions tested.

1. Credits / Contributors

A list of contributors to shUnit2 can be found in the source archive as doc/contributors.txt. I want to personally thank all those who have contributed to make this a better tool.

2. Feedback

Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address: .

Chapter 2. Quickstart

This chapter will give a very quick start to running unit tests with shUnit2. More information is located in other chapters.

Here is a quick sample script to show how easy it is to write a unit test in shell. It expects that you have a copy of shunit2 in the same directory as the script.

-
-#! /bin/sh
-
-testEquality()
-{
-  assertEquals 1 1
-}
-
-# load shunit2
-. ./shunit2
-
-  

Running the unit test should give results similar to the following.

-
-#
-# Performing tests
-#
-testEquality
-
-#
-# Test report
-#
-tests passed: 1
-tests failed: 0
-tests total:  1
-success rate: 100%
-
-  

Wohoo! You've just run your first successful unit test. So, what just happened? Quite a bit really, and it all happened simply by sourcing the shunit2 script. The basic functionality for the script above goes like this.

When shUnit2 is sourced, it first looks to see if a suite() function has been declared. If it exists, it is called as it is expected to contain a list of tests to be executed. If it doesn't exist (and it doesn't in the above example), shUnit2 will look on its own for any functions that start with the string test, and adds those to an internal list of tests to execute. Once a list of test functions to be run has been determined, shunit2 will go to work.

Before any tests are executed, shUnit2 again looks for a function, this time one named oneTimeSetUp(). If it exists, it will be run. This function is normally used to setup the environment for all tests to be run. Things like creating directories for output or setting environment variables are good to place here. Just so you know, you can also declare a corresponding function named oneTimeTearDown() function that does the same thing, but once all the tests have been completed. It is good for removing temporary directories, etc.

shUnit2 is now ready to run tests. Before doing so though, it again looks for another function that might be declared, one named setUp(). If the function exists, it will be run before each test. It is good for resetting the environment so that each test starts with a clean slate. At this stage, the first test is finally run. The success of the test is recorded for a report that will be generated later. After the test is run, shUnit2 looks for a final function that might be declared, one named tearDown(). If it exists, it will be run after each test. It is a good place for cleaning up after each test, maybe doing things like removing files that were created, or removing directories. This set of steps, setUp() > test() > tearDown(), is repeated for all of the available tests.

Once all the work is done, shUnit2 will generate the nice report you saw above. A summary of all the successes and failures will be given so that you know how well your code is doing.

We should now try adding a test that fails. Change your unit test to look like this.

-
-#! /bin/sh
-
-testEquality()
-{
-  assertEquals 1 1
-}
-
-testPartyLikeItIs1999()
-{
-  year=`date '+%Y'`
-  assertEquals "It's not 1999 :-( This is ${year}." \
-      '1999' "${year}"
-}
-
-# load shunit2
-. ./shunit2
-
-  

So, what did you get? I guess it told you that this isn't 1999. Bummer, eh? Hopefully, you noticed a couple of things that were different about the second test. First, we added an optional message that the user will see if the assert fails. Second, we did comparisons of strings instead of integers as in the first test. It doesn't matter whether you are testing for equality of strings or integers. Both work equally well with shUnit2.

Hopefully, this is enough to get you started with unit testing. If you want a ton more examples, take a look at the tests provided with log4sh. Examples of much more advanced usage can be seen there. shUnit2 was after all written to help with the unit testing problems that log4sh had.

Chapter 3. Function Reference

1. asserts

Table 3.1. asserts

- void - -
- assertEquals - ([message],  
 expected,  
 actual); 
string  [message];
string  expected;
string  actual;
-

Asserts that expected and - actual are equal to one another. The message is - optional.

-
- void - -
- assertNull - ([message],  
 value); 
string  [message];
string  value;
-

Asserts that value is null, - or in shell terms a zero-length string. The message is optional.

-
- void - -
- assertNotNull - ([message],  
 value); 
string  [message];
string  value;
-

Asserts that value is notnull, or in shell terms not - a zero-length string. The message is optional.

-
- void - -
- assertSame - ([message],  
 expected,  
 actual); 
string  [message];
string  expected;
string  actual;
-

This function is functionally equivalent to - assertEquals.

-
- void - -
- assertNotSame - ([message],  
 unexpected,  
 actual); 
string  [message];
string  unexpected;
string  actual;
-

Asserts that unexpected and - actual are not - equal to one another. The message is optional.

-
- void - -
- assertTrue - ([message],  
 condition); 
string  [message];
string  condition;
-

Asserts that a given shell test condition is true. The message is - optional.

-

Testing whether something is true or false is easy enough by using - the assertEquals/assertNotSame functions. Shell supports much more - complicated tests though, and a means to support them was needed. As such, - this function tests that conditions are true or false through evaluation - rather than just looking for a true or false.

-
- The following test will succeed:
assertTrue "[ 34 -gt 23 ]"
- The following test will fail with a message:
assertTrue "test failed" "[ -r '/non/existent/file' ]"
-
- void - -
- assertFalse - ([message],  
 condition); 
string  [message];
string  condition;
-

Asserts that a given shell test condition is false. The message is - optional.

-

Testing whether something is true or false is easy enough by using - the assertEquals/assertNotSame functions. Shell supports much more - complicated tests though, and a means to support them was needed. As such, - this function tests that conditions are true or false through evaluation - rather than just looking for a true or false.

-
- The following test will succeed:
assertFalse "[ 'apples' = 'oranges' ]"
- The following test will fail with a message:
assertFalse "test failed" "[ 1 -eq 1 -a 2 -eq 2 ]"
-

2. failures

Table 3.2. failures

- void - -
- fail - ([message]); 
string  [message];
-

Fails the test immediately, with the optional message.

-
- void - -
- failNotEquals - ([message],  
 unexpected,  
 actual); 
string  [message];
string  unexpected;
string  actual;
-

Fails the test if unexpected and - actual are not - equal to one another. The message is optional.

-
- void - -
- failSame - ([message]); 
string  [message];
-

Indicate test failure because arguments were not the same. The - message is optional.

-
- void - -
- failNotSame - ([message],  
 expected,  
 actual); 
string  [message];
string  expected;
string  actual;
-

Fails the test if expected and - actual are equal to one another. The message is - optional.

-

3. suites

Table 3.3. suites

- void - -
- suite - (); 
 ;
-

This function can be optionally overridden by the user in their test - suite.

-

If this function exists, it will be called when - shunit2 is sourced. If it does not exist, shUnit2 will - search the parent script for all functions beginning with the word - test, and they will be added dynamically to the test - suite.

-
- void - -
- suite_addTest - (function); 
string  function;
-

This function adds a function name to the list of tests scheduled for - execution as part of this test suite. This function should only be called - from within the suite() function.

-
- void - -
- oneTimeSetUp - (); 
 ;
-

This function can be be optionally overridden by the user in their - test suite.

-

If this function exists, it will be called once before any tests are - run. It is useful to prepare a common environment for all tests.

-
- void - -
- oneTimeTearDown - (); 
 ;
-

This function can be be optionally overridden by the user in their - test suite.

-

If this function exists, it will be called once after all tests are - completed. It is useful to clean up the environment after all tests.

-
- void - -
- setUp - (); 
 ;
-

This function can be be optionally overridden by the user in their - test suite.

-

If this function exists, it will be called before each test is run. - It is useful to reset the environment before each test.

-
- void - -
- tearDown - (); 
 ;
-

This function can be be optionally overridden by the user in their - test suite.

-

If this function exists, it will be called after each test completes. - It is useful to clean up the environment after each test.

-

diff --git a/test/shunit2-2.0.3/doc/style.css b/test/shunit2-2.0.3/doc/style.css deleted file mode 100644 index c1d2f43..0000000 --- a/test/shunit2-2.0.3/doc/style.css +++ /dev/null @@ -1,33 +0,0 @@ -/* $Id$ */ -/* - style.css -*/ - - -body { - -/* - Style the HMTL tag with a sans-serif font and 6% margin. - A sans-serif font makes documents easier to read when displayed on - a computer screen. Whitespace surrounding the document should - make it easier to read both on screen and on printed paper. The - value of 6% was chosen because it closely approximates a one-half - inch margin on a US letter (8.5" by 11") paper. Since the margin - is expressed as a percentage it should scale well in a web browser - window. -*/ - - font-family: sans-serif; - margin: 6%; -} - -/* -table { - font-size: 0.9em; -} -*/ - -.toc { - background: #f0f0f0; - padding: 5px; -} diff --git a/test/shunit2-2.0.3/lib/sh/shlib b/test/shunit2-2.0.3/lib/sh/shlib deleted file mode 100644 index 00aadcb..0000000 --- a/test/shunit2-2.0.3/lib/sh/shlib +++ /dev/null @@ -1,23 +0,0 @@ -# $Id$ -# vim:syntax=sh -# -# library of shell functions -# - -shlib_relToAbsPath() -{ - _shlib_path=$1 - - # deal with paths that start with / - echo "${_shlib_path}" |grep '^/' >/dev/null 2>&1 - if [ $? -ne 0 ]; then - _shlib_pwd=`pwd` - _shlib_path="${_shlib_pwd}/${_shlib_path}" - unset _shlib_pwd - fi - - # clean up the path - echo "${_shlib_path}" |sed 's/[^/]*\/*\.\.\/*//g;s/\/\.\//\//' - - unset _shlib_path -} diff --git a/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl b/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl deleted file mode 100644 index b7a7d43..0000000 --- a/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/fo/tldp-print.xsl +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - -start - - - - - - - - diff --git a/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl b/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl deleted file mode 100644 index f8cf7b1..0000000 --- a/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-common.xsl +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - -text/css - - - - - - - diff --git a/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl b/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl deleted file mode 100644 index 16994ad..0000000 --- a/test/shunit2-2.0.3/share/docbook/tldp-xsl/21MAR2004/html/tldp-one-page.xsl +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/test/shunit2-2.0.3/share/resources/shelldoc.xslt b/test/shunit2-2.0.3/share/resources/shelldoc.xslt deleted file mode 100644 index 45d5f92..0000000 --- a/test/shunit2-2.0.3/share/resources/shelldoc.xslt +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - Function Reference - - - -
- shelldoc-section- - <xsl:value-of select="@group"/> - - shelldoc-function- - <xsl:value-of select="@group"/> - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- - - - - - - -
diff --git a/test/shunit2-2.0.3/src/docbook/functions.xml b/test/shunit2-2.0.3/src/docbook/functions.xml deleted file mode 100644 index c960e55..0000000 --- a/test/shunit2-2.0.3/src/docbook/functions.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Functions - This XML file is a placeholder. It is meant to be overwritten with the dynamically generated XML document that is extracted from the source code. - diff --git a/test/shunit2-2.0.3/src/docbook/introduction.xml b/test/shunit2-2.0.3/src/docbook/introduction.xml deleted file mode 100644 index d71b091..0000000 --- a/test/shunit2-2.0.3/src/docbook/introduction.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - Introduction - shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc. - - shUnit2 was originally developed to provide a consistent testing solution for log4sh, a shell based logging framework similar to log4j. During the development of that product, the problem of having things work just fine under one shell (/bin/bash on Linux to be specific), and then not working under another shell (/bin/sh on Solaris), kept coming up. Although there were several simple tests ran, they were not adaquate and did not catch very many corner cases. The decision was finally made to write a proper unit test framework after after multiple brown-bag releases were made. - -
Tested Operating Systems - - Cygwin - FreeBSD (user supported) - Linux (Gentoo, Ubuntu) - Mac OS X - Solaris 8, 9, 10 - -
- -
Tested Shells - - Bourne Shell (sh) - BASH - GNU Bourne Again SHell (bash) - DASH (dash) - Korn Shell (ksh) - pdksh - Public Domain Korn Shell (pdksh) - -
- - See the appropriate Release Notes (doc/RELEASE_NOTES-X.X.X.txt) for this release for the actual versions tested. - - -
Credits / Contributors - A list of contributors to shUnit2 can be found in the source archive as doc/contributors.txt. I want to personally thank all those who have contributed to make this a better tool. -
- - -
Feedback - Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address: &myEmail;. -
- -
diff --git a/test/shunit2-2.0.3/src/docbook/quickstart.xml b/test/shunit2-2.0.3/src/docbook/quickstart.xml deleted file mode 100644 index d009cb6..0000000 --- a/test/shunit2-2.0.3/src/docbook/quickstart.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - Quickstart - - This chapter will give a very quick start to running unit tests with shUnit2. More information is located in other chapters. - - Here is a quick sample script to show how easy it is to write a unit test in shell. It expects that you have a copy of &shunit2; in the same directory as the script. - - - - - - Running the unit test should give results similar to the following. - - - - - - Wohoo! You've just run your first successful unit test. So, what just happened? Quite a bit really, and it all happened simply by sourcing the &shunit2; script. The basic functionality for the script above goes like this. - - When shUnit2 is sourced, it first looks to see if a suite() function has been declared. If it exists, it is called as it is expected to contain a list of tests to be executed. If it doesn't exist (and it doesn't in the above example), shUnit2 will look on its own for any functions that start with the string test, and adds those to an internal list of tests to execute. Once a list of test functions to be run has been determined, shunit2 will go to work. - - Before any tests are executed, shUnit2 again looks for a function, this time one named oneTimeSetUp(). If it exists, it will be run. This function is normally used to setup the environment for all tests to be run. Things like creating directories for output or setting environment variables are good to place here. Just so you know, you can also declare a corresponding function named oneTimeTearDown() function that does the same thing, but once all the tests have been completed. It is good for removing temporary directories, etc. - - shUnit2 is now ready to run tests. Before doing so though, it again looks for another function that might be declared, one named setUp(). If the function exists, it will be run before each test. It is good for resetting the environment so that each test starts with a clean slate. At this stage, the first test is finally run. The success of the test is recorded for a report that will be generated later. After the test is run, shUnit2 looks for a final function that might be declared, one named tearDown(). If it exists, it will be run after each test. It is a good place for cleaning up after each test, maybe doing things like removing files that were created, or removing directories. This set of steps, setUp() > test() > tearDown(), is repeated for all of the available tests. - - Once all the work is done, shUnit2 will generate the nice report you saw above. A summary of all the successes and failures will be given so that you know how well your code is doing. - - We should now try adding a test that fails. Change your unit test to look like this. - - - - - - So, what did you get? I guess it told you that this isn't 1999. Bummer, eh? Hopefully, you noticed a couple of things that were different about the second test. First, we added an optional message that the user will see if the assert fails. Second, we did comparisons of strings instead of integers as in the first test. It doesn't matter whether you are testing for equality of strings or integers. Both work equally well with shUnit2. - - Hopefully, this is enough to get you started with unit testing. If you want a ton more examples, take a look at the tests provided with log4sh. Examples of much more advanced usage can be seen there. shUnit2 was after all written to help with the unit testing problems that log4sh had. - diff --git a/test/shunit2-2.0.3/src/docbook/shunit2.xml b/test/shunit2-2.0.3/src/docbook/shunit2.xml deleted file mode 100644 index 25b3fed..0000000 --- a/test/shunit2-2.0.3/src/docbook/shunit2.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - shunit2"> -]> - -shUnit2 - - shUnit2 version 2.0.3 - - - KateWard - -
- &myEmail; -
-
-
-
- - - &isoDate; - - - - - - - 2.0.3 - 2007-07-12 - Kate Ward <&myEmail;> - - - - 2.0.2 - 2007-04-22 - Kate Ward <&myEmail;> - - - - 2.0.1 - 2007-02-21 - Kate Ward <&myEmail;> - - - - 2.0.0 - 2007-02-20 - Kate Ward <&myEmail;> - - - - - - shUnit2 is a unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc. - -
- - &introduction; - &quickstart; - &functions; -
diff --git a/test/shunit2-2.0.3/src/shell/shunit2 b/test/shunit2-2.0.3/src/shell/shunit2 deleted file mode 100644 index b9d1130..0000000 --- a/test/shunit2-2.0.3/src/shell/shunit2 +++ /dev/null @@ -1,799 +0,0 @@ -# $Id$ -# vim:syntax=sh:sts=2 -# vim:foldmethod=marker:foldmarker=/**,*/ -# -#/** -# -# -# -# shUnit 2.0.4 -# Shell Unit Test Framework -# -# http://code.google.com/p/shunit2/ -# -# written by Kate Ward <kate.ward@forestent.com> -# released under the LGPL -# -# this module implements a xUnit based unit test framework similar to JUnit -# -#*/ - -# shell flags for shunit: -# u - treat unset variables as an error when performing parameter expansion -__SHUNIT_SHELL_FLAGS='u' - -# save the current set of shell flags, and then set some for ourselves -__shunit_oldShellFlags="$-" -for _shunit_shellFlag in `echo "${__SHUNIT_SHELL_FLAGS}" |sed 's/\(.\)/\1 /g'` -do - set -${_shunit_shellFlag} -done -unset _shunit_shellFlag - -# constants - -__SHUNIT_VERSION='2.0.4pre' - -__SHUNIT_TRUE=0 -__SHUNIT_FALSE=1 -__SHUNIT_ERROR=2 - -__SHUNIT_ASSERT_MSG_PREFIX='ASSERT:' - -for _su_const in `set |grep "^__SHUNIT_" |cut -d= -f1`; do - readonly ${_su_const} -done -unset _su_const - -# variables -__shunit_suite='' - -__shunit_testsPassed=0 -__shunit_testsFailed=0 -__shunit_testsTotal=0 - -#----------------------------------------------------------------------------- -# assert functions -# - -#/** -# -# -# void -# -# -# -# -# assertEquals -# string [message] -# string expected -# string actual -# -# -# Asserts that expected and -# actual are equal to one another. The message is -# optional. -# -# -#*/ -assertEquals() -{ - _su_message='' - if [ $# -eq 3 ]; then - _su_message=$1 - shift - fi - _su_expected=${1:-} - _su_actual=${2:-} - - shunit_return=${__SHUNIT_TRUE} - if [ "${_su_expected}" = "${_su_actual}" ]; then - _shunit_testPassed - else - failNotEquals "${_su_message}" "${_su_expected}" "${_su_actual}" - shunit_return=${__SHUNIT_FALSE} - fi - - unset _su_message _su_expected _su_actual - return ${shunit_return} -} - -#/** -# -# -# void -# -# -# -# -# assertNull -# string [message] -# string value -# -# -# Asserts that value is null, -# or in shell terms a zero-length string. The message is optional. -# -# -#*/ -assertNull() -{ - if [ $# -eq 2 ]; then - assertTrue "$1" "[ -z '$2' ]" - else - assertTrue "[ -z '${1:-}' ]" - fi -} - -#/** -# -# -# void -# -# -# -# -# assertNotNull -# string [message] -# string value -# -# -# Asserts that value is not null, or in shell terms not -# a zero-length string. The message is optional. -# -# -#*/ -assertNotNull() -{ - if [ $# -eq 2 ]; then - assertTrue "$1" "[ -n '$2' ]" - else - assertTrue "[ -n '${1:-}' ]" - fi -} - -#/** -# -# -# void -# -# -# -# -# assertSame -# string [message] -# string expected -# string actual -# -# -# This function is functionally equivalent to -# assertEquals. -# -# -#*/ -assertSame() -{ - assertEquals "${@:-}" -} - -#/** -# -# -# void -# -# -# -# -# assertNotSame -# string [message] -# string unexpected -# string actual -# -# -# Asserts that unexpected and -# actual are not -# equal to one another. The message is optional. -# -# -#*/ -assertNotSame() -{ - _su_message='' - if [ $# -eq 3 ]; then - _su_message=$1 - shift - fi - _su_unexpected=${1:-} - _su_actual=${2:-} - - shunit_return=${__SHUNIT_TRUE} - if [ "${_su_unexpected}" != "${_su_actual}" ]; then - _shunit_testPassed - else - failSame "${_su_message}" - shunit_return=${__SHUNIT_FALSE} - fi - - unset _su_message _su_unexpected _su_actual - return ${shunit_return} -} - -#/** -# -# -# void -# -# -# -# -# assertTrue -# string [message] -# string condition -# -# -# Asserts that a given shell test condition is true. The message is -# optional. -# Testing whether something is true or false is easy enough by using -# the assertEquals/assertNotSame functions. Shell supports much more -# complicated tests though, and a means to support them was needed. As such, -# this function tests that conditions are true or false through evaluation -# rather than just looking for a true or false. -# -# The following test will succeed: assertTrue "[ 34 -gt 23 ]" -# The following test will fail with a message: assertTrue "test failed" "[ -r '/non/existent/file' ]" -# -# -# -#*/ -assertTrue() -{ - _su_message='' - if [ $# -eq 2 ]; then - _su_message=$1 - shift - fi - _su_condition=${1:-} - - shunit_return=${__SHUNIT_TRUE} - - # see if condition is an integer, i.e. a return value - _su_match=`expr "${_su_condition}" : '\([0-9]*\)'` - if [ -z "${_su_condition}" ]; then - # null condition - shunit_return=${__SHUNIT_FALSE} - elif [ "${_su_condition}" = "${_su_match}" ]; then - # possible return value. treating 0 as true, and non-zero as false. - [ ${_su_condition} -ne 0 ] && shunit_return=${__SHUNIT_FALSE} - else - # (hopefully) a condition - ( eval ${_su_condition} ) >/dev/null 2>&1 - [ $? -ne 0 ] && shunit_return=${__SHUNIT_FALSE} - fi - - # record the test - if [ ${shunit_return} -eq ${__SHUNIT_TRUE} ]; then - _shunit_testPassed - else - _shunit_testFailed "${_su_message}" - fi - - unset _su_message _su_condition _su_match - return ${shunit_return} -} - -#/** -# -# -# void -# -# -# -# -# assertFalse -# string [message] -# string condition -# -# -# Asserts that a given shell test condition is false. The message is -# optional. -# Testing whether something is true or false is easy enough by using -# the assertEquals/assertNotSame functions. Shell supports much more -# complicated tests though, and a means to support them was needed. As such, -# this function tests that conditions are true or false through evaluation -# rather than just looking for a true or false. -# -# The following test will succeed: assertFalse "[ 'apples' = 'oranges' ]" -# The following test will fail with a message: assertFalse "test failed" "[ 1 -eq 1 -a 2 -eq 2 ]" -# -# -# -#*/ -assertFalse() -{ - _su_message='' - if [ $# -eq 2 ]; then - _su_message=$1 - shift - fi - _su_condition=${1:-} - - shunit_return=${__SHUNIT_TRUE} - - # see if condition is an integer, i.e. a return value - _su_match=`expr "${_su_condition}" : '\([0-9]*\)'` - if [ -z "${_su_condition}" ]; then - # null condition - shunit_return=${__SHUNIT_FALSE} - elif [ "${_su_condition}" = "${_su_match}" ]; then - # possible return value. treating 0 as true, and non-zero as false. - [ ${_su_condition} -eq 0 ] && shunit_return=${__SHUNIT_FALSE} - else - # (hopefully) a condition - ( eval ${_su_condition} ) >/dev/null 2>&1 - [ $? -eq 0 ] && shunit_return=${__SHUNIT_FALSE} - fi - - # record the test - if [ ${shunit_return} -eq ${__SHUNIT_TRUE} ]; then - _shunit_testPassed - else - _shunit_testFailed "${_su_message}" - fi - - unset _su_message _su_condition _su_match - return ${shunit_return} -} - -#----------------------------------------------------------------------------- -# failure functions -# - -#/** -# -# -# void -# -# -# -# -# fail -# string [message] -# -# -# Fails the test immediately, with the optional message. -# -# -#*/ -fail() -{ - _su_message=${1:-} - - _shunit_testFailed "${_su_message}" - - unset _su_message -} - -#/** -# -# -# void -# -# -# -# -# failNotEquals -# string [message] -# string unexpected -# string actual -# -# -# Fails the test if unexpected and -# actual are not -# equal to one another. The message is optional. -# -# -#*/ -failNotEquals() -{ - _su_message='' - if [ $# -eq 3 ]; then - _su_message=$1 - shift - fi - _su_unexpected=${1:-} - _su_actual=${2:-} - - _shunit_testFailed "${_su_message:+${_su_message} }expected:<${_su_unexpected}> but was:<${_su_actual}>" - - unset _su_message _su_unexpected _su_actual -} - -#/** -# -# -# void -# -# -# -# -# failSame -# string [message] -# -# -# Indicate test failure because arguments were not the same. The -# message is optional. -# -# -#*/ -failSame() -{ - _su_message=${1:-} - - _shunit_testFailed "${_su_message:+${_su_message} }expected not same" - - unset _su_message -} - -#/** -# -# -# void -# -# -# -# -# failNotSame -# string [message] -# string expected -# string actual -# -# -# Fails the test if expected and -# actual are equal to one another. The message is -# optional. -# -# -#*/ -failNotSame() -{ - failNotEquals "${@:-}" -} - -#----------------------------------------------------------------------------- -# suite functions -# - -#/** -# -# -# void -# -# -# -# -# suite -# -# -# -# This function can be optionally overridden by the user in their test -# suite. -# If this function exists, it will be called when -# shunit2 is sourced. If it does not exist, shUnit2 will -# search the parent script for all functions beginning with the word -# test, and they will be added dynamically to the test -# suite. -# -# -#*/ -# Note: see _shunit_mktempFunc() for actual implementation -# suite() { :; } - -#/** -# -# -# void -# -# -# -# -# suite_addTest -# string function -# -# -# This function adds a function name to the list of tests scheduled for -# execution as part of this test suite. This function should only be called -# from within the suite() function. -# -# -#*/ -suite_addTest() -{ - _su_func=${1:-} - - __shunit_suite="${__shunit_suite:+${__shunit_suite} }${_su_func}" - - unset _su_func -} - -#/** -# -# -# void -# -# -# -# -# oneTimeSetUp -# -# -# -# This function can be be optionally overridden by the user in their -# test suite. -# If this function exists, it will be called once before any tests are -# run. It is useful to prepare a common environment for all tests. -# -# -#*/ -# Note: see _shunit_mktempFunc() for actual implementation -# oneTimeSetUp() { :; } - -#/** -# -# -# void -# -# -# -# -# oneTimeTearDown -# -# -# -# This function can be be optionally overridden by the user in their -# test suite. -# If this function exists, it will be called once after all tests are -# completed. It is useful to clean up the environment after all tests. -# -# -#*/ -# Note: see _shunit_mktempFunc() for actual implementation -# oneTimeTearDown() { :; } - -#/** -# -# -# void -# -# -# -# -# setUp -# -# -# -# This function can be be optionally overridden by the user in their -# test suite. -# If this function exists, it will be called before each test is run. -# It is useful to reset the environment before each test. -# -# -#*/ -# Note: see _shunit_mktempFunc() for actual implementation -# setUp() { :; } - -#/** -# -# -# void -# -# -# -# -# tearDown -# -# -# -# This function can be be optionally overridden by the user in their -# test suite. -# If this function exists, it will be called after each test completes. -# It is useful to clean up the environment after each test. -# -# -#*/ -# Note: see _shunit_mktempFunc() for actual implementation -# tearDown() { :; } - -#------------------------------------------------------------------------------ -# internal shUnit2 functions -# - -_shunit_cleanup() -{ - name=$1 - - case ${name} in - EXIT) signal=0 ;; - INT) signal=2 ;; - TERM) signal=15 ;; - esac - - # do our work - rm -fr "${__shunit_tmpDir}" - - # exit for all non-EXIT signals - if [ ${name} != 'EXIT' ]; then - echo "trapped and now handling the ${name} signal" >&2 - _shunit_generateReport - # disable EXIT trap - trap 0 - # add 128 to signal and exit - exit `expr ${signal} + 128` - fi -} - -_shunit_execSuite() -{ - echo '#' - echo '# Performing tests' - echo '#' - for _su_func in ${__shunit_suite}; do - # execute the per-test setup function - setUp - - # execute the test - echo "${_su_func}" - eval ${_su_func} - - # execute the per-test tear-down function - tearDown - done - - unset _su_func -} - -_shunit_functionExists() -{ - _su__func=$1 - type ${_su__func} 2>/dev/null |grep "is a function$" >/dev/null - _su__return=$? - unset _su__func - return ${_su__return} -} - -_shunit_generateReport() -{ - _su__awkPercent='{printf("%0.0f%%", $1*100/$2)}' - if [ ${__shunit_testsTotal} -gt 0 ]; then - _su__success=`echo ${__shunit_testsPassed} ${__shunit_testsTotal} |\ - awk "${_su__awkPercent}"` - else - _su__success=0 - fi - - cat </dev/null ) && return - - # the standard mktemp didn't work. doing our own. - if [ -r '/dev/urandom' -a -x '/usr/bin/od' ]; then - _su__random=`/usr/bin/od -vAn -N4 -tx4 &2 - return ${__SHUNIT_ERROR} - } - - echo ${_su__tmpDir} - unset _su__date _su__random _su__tmpDir -} - -# this function is here to work around issues in Cygwin -_shunit_mktempFunc() -{ - for _su__func in oneTimeSetUp oneTimeTearDown setUp tearDown suite; do - _su__file="${__shunit_tmpDir}/${_su__func}" - cat <"${_su__file}" -#! /bin/sh -exit 0 -EOF - chmod +x "${_su__file}" - done - - unset _su__file -} - -_shunit_testPassed() -{ - __shunit_testsPassed=`expr ${__shunit_testsPassed} + 1` - __shunit_testsTotal=`expr ${__shunit_testsTotal} + 1` -} - -_shunit_testFailed() -{ - _su__msg=$1 - - __shunit_testsFailed=`expr ${__shunit_testsFailed} + 1` - __shunit_testsTotal=`expr ${__shunit_testsTotal} + 1` - echo "${__SHUNIT_ASSERT_MSG_PREFIX}${_su__msg}" >&2 - - unset _su__msg -} - -#------------------------------------------------------------------------------ -# main -# - -# create a temporary storage location -__shunit_tmpDir=`_shunit_mktempDir` || exit ${__SHUNIT_ERROR} - -# setup traps to clean up after ourselves -trap '_shunit_cleanup EXIT' 0 -trap '_shunit_cleanup INT' 2 -trap '_shunit_cleanup TERM' 15 - -# create phantom functions to work around issues with Cygwin -_shunit_mktempFunc -PATH="${__shunit_tmpDir}:${PATH}" - -# execute the oneTimeSetUp function (if it exists) -#_shunit_functionExists oneTimeSetUp && oneTimeSetUp -oneTimeSetUp - -# deprecated: execute the suite function defined in the parent test script -suite - -# if no suite function was defined, dynamically build a list of functions -if [ -z "${__shunit_suite}" ]; then - funcs=`grep "^[ \t]*test[A-Za-z0-9_]* *()" $0 |sed 's/[^A-Za-z0-9_]//g'` - for func in ${funcs}; do - suite_addTest ${func} - done -fi - -# execute the tests -_shunit_execSuite - -# execute the oneTimeTearDown function (if it exists) -oneTimeTearDown - -# generate report -_shunit_generateReport - -# restore the previous set of shell flags -for _shunit_shellFlag in ${__SHUNIT_SHELL_FLAGS}; do - echo ${__shunit_oldShellFlags} |grep ${_shunit_shellFlag} >/dev/null \ - || set +${_shunit_shellFlag} -done -unset _shunit_shellFlag - -#/** -# -#*/ diff --git a/test/shunit2-2.0.3/src/test/run-test-suite b/test/shunit2-2.0.3/src/test/run-test-suite deleted file mode 100755 index 7791fa1..0000000 --- a/test/shunit2-2.0.3/src/test/run-test-suite +++ /dev/null @@ -1,116 +0,0 @@ -#! /bin/sh -# $Id: run-test-suite 432 2007-01-05 14:58:37Z sfsetse $ - -MY_NAME=`basename $0` -MY_PATH=`dirname $0` - -SHELLS='/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh' -for f in test[A-Z]*; do - [ -x "${f}" ] && TESTS="${TESTS:+${TESTS} }${f}" -done - -# load common unit test functions -. "${MY_PATH}/test-functions.inc" - -usage() -{ - echo "usage: ${MY_NAME} [-e key=val ...] [-s shell(s)] [-t test(s)]" -} - -# process command line flags -while getopts 'e:hs:t:' opt; do - case ${opt} in - e) - key=`expr "${OPTARG}" : '\([^=]*\)='` - val=`expr "${OPTARG}" : '[^=]*=\(.*\)'` - if [ -z "${key}" -o -z "${val}" ]; then - usage - exit 1 - fi - eval "${key}='${val}'" - export ${key} - env="${env:+${env} }${key}" - ;; - h) usage; exit 0 ;; - s) shells=${OPTARG} ;; - t) tests=${OPTARG} ;; - *) usage; exit 1 ;; - esac -done -shift `expr ${OPTIND} - 1` - -# fill shells and/or tests -shells=${shells:-${SHELLS}} -tests=${tests:-${TESTS}} - -# error checking -if [ -z "${tests}" ]; then - tf_error 'no tests found to run; exiting' - exit 1 -fi - -cat <&1` - exitVal=$? - if [ ${exitVal} -eq 2 ]; then - echo - echo "${version}" - fi - ;; - pdksh) ;; - zsh) ;; - esac - - # execute the tests - for suite in ${tests}; do - suiteName=`expr "${suite}" : 'test\(.*\)'` - echo - echo "--- Executing the '${suiteName}' test suite ---" >&2 - ( exec ${shell} ./${suite}; ) - done -done diff --git a/test/shunit2-2.0.3/src/test/test-functions.inc b/test/shunit2-2.0.3/src/test/test-functions.inc deleted file mode 100644 index fe7b3e9..0000000 --- a/test/shunit2-2.0.3/src/test/test-functions.inc +++ /dev/null @@ -1,84 +0,0 @@ -# $Id: test-functions.inc 416 2007-01-04 00:50:14Z sfsetse $ -# vim:syntax=sh:sts=2 - -# -# constants -# - -# configure debugging. set the DEBUG environment variable to any -# non-empty value to enable debug output, or TRACE to enable trace -# output. -TRACE=${TRACE:+'tf_trace '} -[ -n "${TRACE}" ] && DEBUG=1 -[ -z "${TRACE}" ] && TRACE=':' - -DEBUG=${DEBUG:+'tf_debug '} -[ -z "${DEBUG}" ] && DEBUG=':' - -# -# variables -# - -tf_RANDOM=0 - -# -# functions -# - -# message functions -tf_trace() { echo "${MY_NAME}:TRACE $@" >&2; } -tf_debug() { echo "${MY_NAME}:DEBUG $@" >&2; } -tf_info() { echo "${MY_NAME}:INFO $@" >&2; } -tf_warn() { echo "${MY_NAME}:WARN $@" >&2; } -tf_error() { echo "${MY_NAME}:ERROR $@" >&2; } -tf_fatal() { echo "${MY_NAME}:FATAL $@" >&2; } - -# generate a random number -tf_generateRandom() -{ - tfgr_random=${tf_RANDOM} - - while [ "${tfgr_random}" = "${tf_RANDOM}" ]; do - if [ -n "${RANDOM:-}" ]; then - # $RANDOM works - tfgr_random=${RANDOM}${RANDOM}${RANDOM}$$ - elif [ -r '/dev/urandom' ]; then - tfgr_random=`od -vAn -N4 -tu4 -# -# Self-testing unit tests for shUnit2 asserts -# - -MSG='This is a test message' - -#----------------------------------------------------------------------------- -# suite tests -# - -commonEqualsSame() -{ - fn=$1 - - msg='same, with message' - rslt=`${fn} "${MSG}" 'x' 'x' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='same' - rslt=`${fn} 'x' 'x' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='not same' - rslt=`${fn} 'x' 'y' 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='null values' - rslt=`${fn} '' '' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='too few arguments' - rslt=`${fn} 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} -} - -testAssertEquals() -{ - commonEqualsSame 'assertEquals' -} - -testAssertSame() -{ - commonEqualsSame 'assertSame' -} - -testAssertNotSame() -{ - msg='not same, with message' - rslt=`assertNotSame "${MSG}" 'x' 'y' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='not same' - rslt=`assertNotSame 'x' 'y' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='same' - rslt=`assertNotSame 'x' 'x' 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='null values' - rslt=`assertNotSame '' '' 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='too few arguments' - rslt=`assertNotSame 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} -} - -testAssertNull() -{ - msg='null, with message' - rslt=`assertNull "${MSG}" '' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='null' - rslt=`assertNull '' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='not null' - rslt=`assertNull 'x' 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='too few arguments' - rslt=`assertNull 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} -} - -testAssertNotNull() -{ - msg='not null, with message' - rslt=`assertNotNull "${MSG}" 'x' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='not null' - rslt=`assertNotNull 'x' 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='null' - rslt=`assertNotNull '' 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='too few arguments' - rslt=`assertNotNull 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} -} - -testAssertTrue() -{ - msg='true, with message' - rslt=`assertTrue "${MSG}" 0 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='true' - rslt=`assertTrue 0 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='true condition' - rslt=`assertTrue "[ 0 -eq 0 ]" 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='false' - rslt=`assertTrue 1 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='false condition' - rslt=`assertTrue "[ 0 -eq 1 ]" 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='null value' - rslt=`assertTrue '' 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='too few arguments' - rslt=`assertTrue 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} -} - -testAssertFalse() -{ - msg='false, with message' - rslt=`assertFalse "${MSG}" 1 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='false' - rslt=`assertFalse 1 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='false condition' - rslt=`assertFalse "[ 0 -eq 1 ]" 2>&1` - rtrn=$? - assertSame "${msg}" '' "${rslt}" - assertTrue "${msg}; failure" ${rtrn} - - msg='true' - rslt=`assertFalse 0 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='true condition' - rslt=`assertFalse "[ 0 -eq 0 ]" 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='null value' - rslt=`assertFalse '' 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} - - msg='too few arguments' - rslt=`assertFalse 2>&1` - rtrn=$? - assertNotSame "${msg}" '' "${rslt}" - assertFalse "${msg}; failure" ${rtrn} -} - -#----------------------------------------------------------------------------- -# suite functions -# - -# load and run shUnit2 -. ./shunit2 diff --git a/test/shunit2-2.0.3/src/test/testFailures b/test/shunit2-2.0.3/src/test/testFailures deleted file mode 100755 index 9410510..0000000 --- a/test/shunit2-2.0.3/src/test/testFailures +++ /dev/null @@ -1,89 +0,0 @@ -#! /bin/sh -# $Id$ -# vim: expandtab -# author: Kate Ward -# -# Self-testing unit tests for shUnit2 failures -# - -MSG='This is a test message' - -#----------------------------------------------------------------------------- -# suite tests -# - -commonNotEqualsSame() -{ - fn=$1 - - msg='same, with message' - rslt=`${fn} "${MSG}" 'x' 'x' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='same' - rslt=`${fn} 'x' 'x' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='not same' - rslt=`${fn} 'x' 'y' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='null values' - rslt=`${fn} '' '' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='too few arguments' - rslt=`${fn} 2>&1` - assertNotSame "${msg}" '' "${rslt}" -} - -testFail() -{ - msg='with message' - rslt=`fail "${MSG}" 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='without message' - rslt=`fail 2>&1` - assertNotSame "${msg}" '' "${rslt}" -} - -testFailNotEquals() -{ - commonNotEqualsSame 'failNotEquals' -} - -testFailSame() -{ - msg='same, with message' - rslt=`failSame "${MSG}" 'x' 'x' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='same' - rslt=`failSame 'x' 'x' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='not same' - rslt=`failSame 'x' 'y' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='null values' - rslt=`failSame '' '' 2>&1` - assertNotSame "${msg}" '' "${rslt}" - - msg='too few arguments' - rslt=`failSame 2>&1` - assertNotSame "${msg}" '' "${rslt}" -} - -testFailNotSame() -{ - commonNotEqualsSame 'failNotSame' -} - -#----------------------------------------------------------------------------- -# suite functions -# - -# load and run shUnit2 -. ./shunit2 diff --git a/test/shunit2-2.0.3/src/test/testInternalFx b/test/shunit2-2.0.3/src/test/testInternalFx deleted file mode 100755 index 9409dc2..0000000 --- a/test/shunit2-2.0.3/src/test/testInternalFx +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh -# $Id$ -# vim: expandtab -# author: Kate Ward -# -# Self-testing unit tests for shUnit2 internal functions -# - -#----------------------------------------------------------------------------- -# suite tests -# - -testGenerateReport() -{ - : -} - -#----------------------------------------------------------------------------- -# suite functions -# - -# load and run shUnit2 -. ./shunit2 diff --git a/test/shunit2-2.0.3/src/test/testSuiteFx b/test/shunit2-2.0.3/src/test/testSuiteFx deleted file mode 100755 index c0e6ab8..0000000 --- a/test/shunit2-2.0.3/src/test/testSuiteFx +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh -# $Id$ -# vim: expandtab -# author: Kate Ward -# -# Self-testing unit tests for shUnit2 suite functions -# - -#----------------------------------------------------------------------------- -# suite tests -# - -testAddTest() -{ - : -} - -#----------------------------------------------------------------------------- -# suite functions -# - -# load and run shUnit2 -. ./shunit2 -- cgit v1.2.3