cppunit-cvs Mailing List for CppUnit - C++ port of JUnit (Page 15)
Brought to you by:
blep
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(94) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(114) |
Mar
(80) |
Apr
|
May
|
Jun
(36) |
Jul
(67) |
Aug
(37) |
Sep
(33) |
Oct
(28) |
Nov
(91) |
Dec
(16) |
2006 |
Jan
(1) |
Feb
(7) |
Mar
(45) |
Apr
|
May
|
Jun
(36) |
Jul
(7) |
Aug
|
Sep
(32) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
(29) |
Feb
(11) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(35) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(14) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(13) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(15) |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:25
|
Update of /cvsroot/cppunit/cppunit2/include/opentest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/include/opentest Modified Files: forwards.h interfaces.h properties.h serializer.h Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: forwards.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/forwards.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** forwards.h 6 Sep 2005 07:31:42 -0000 1.7 --- forwards.h 7 Nov 2005 22:43:07 -0000 1.8 *************** *** 3,15 **** # include <opentest/config.h> # include <cpptl/enumerator.h> # include <cpptl/sharedptr.h> namespace OpenTest { ! class Property; ! class PropertyPath; ! class Properties; ! class PropertiesAccessor; class ResourceList; class TestDeclarator; --- 3,17 ---- # include <opentest/config.h> + # include <cpptl/forwards.h> # include <cpptl/enumerator.h> # include <cpptl/sharedptr.h> + # include <json/forwards.h> namespace OpenTest { ! typedef Json::Value Value; ! typedef Value Properties; ! typedef CppTL::ConstString String; ! class ResourceList; class TestDeclarator; *************** *** 18,23 **** class TestPlans; class TestRunTracker; - class Value; - class ValueBadCast; class RemoteMessage; --- 20,23 ---- Index: serializer.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/serializer.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** serializer.h 6 Sep 2005 07:31:42 -0000 1.7 --- serializer.h 7 Nov 2005 22:43:07 -0000 1.8 *************** *** 5,8 **** --- 5,9 ---- # include <opentest/properties.h> # include <map> + # include <deque> # include <vector> *************** *** 193,197 **** Stream &operator <<( const String &str ); Stream &operator <<( const Properties &properties ); - Stream &operator <<( const Value &value ); Stream &operator >>( bool &value ); --- 194,197 ---- *************** *** 205,209 **** Stream &operator >>( String &str ); Stream &operator >>( Properties &properties ); - Stream &operator >>( Value &value ); bool inError() const; --- 205,208 ---- *************** *** 227,230 **** --- 226,234 ---- void write( Byte byte ); static bool isNamedPropertyControl( Byte control ); + void unserializeArrayValue( Value &value ); + void unserializeObjectValue( Byte control, + Value &value ); + void serializeArrayValue( const Value &value ); + void serializeObjectValue( const Value &value ); private: Index: properties.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/properties.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** properties.h 1 Jul 2005 20:32:05 -0000 1.13 --- properties.h 7 Nov 2005 22:43:07 -0000 1.14 *************** *** 3,397 **** # include <opentest/forwards.h> # include <cpptl/conststring.h> - # include <cpptl/enumerator.h> - # include <stdexcept> - # include <deque> - # include <vector> - # include <typeinfo> // for std::bad_cast - - namespace OpenTest { - - class OPENTEST_API ValueBadCast : public std::bad_cast - { - public: // overriden from std::bad_cast - const char * what() const throw() - { - return "ValueBadCast: " - "Value can not be converted to the specified type."; - } - }; - - - /// Value wrapper for basic type. - /// - strong exception guaranty. - /// - copy constructor is thread-safe - /// ? should we provide conversion of numeric type to string ? - class OPENTEST_API Value - { - public: - enum Type - { - vtNone = 0, - vtBoolean, - vtSignedInteger, - vtUnsignedInteger, - vtReal, - vtString, - vtProperties - }; - - # ifdef CPPTL_NO_INT64 - typedef int StorageInt; - typedef unsigned int StorageUInt; - # else - typedef CppTL::int64_t StorageInt; - typedef CppTL::uint64_t StorageUInt; - # endif - - Value(); - - Value( bool value ); - - Value( int value ); - - Value( unsigned int value ); - - # ifndef CPPTL_NO_INT64 - Value( CppTL::int64_t value ); - - Value( CppTL::uint64_t value ); - # endif - - Value( float value ); - - Value( double value ); - - Value( const char *value ); - - Value( const CppTL::ConstString &value ); - - Value( const Properties &value ); - - Value( const Value &other ); - - Value &operator =( const Value &other ); - - ~Value(); - - void swap( Value &other ); - - bool asBool() const; - - int asInt() const; - - unsigned int asUInt() const; - - # ifndef CPPTL_NO_INT64 - StorageInt asInt64() const; - - StorageUInt asUInt64() const; - # endif - - double asReal() const; - - CppTL::ConstString asString() const; - - const Properties &asProperties() const; - - Properties &asProperties(); - - bool isNone() const; - - bool isBoolean() const; - - bool isInteger() const; - - bool isSignedInteger() const; - - bool isUnsignedInteger() const; - - bool isReal() const; - - bool isString() const; - - bool isProperties() const; - - bool isConvertibleTo( Type type ) const; - - Type type() const; - - /// Delegates to Properties[] if the value is a Properties. - Value &operator[]( unsigned int index ); - - /// Delegates to Properties[] if the value is a Properties. - Value &operator[]( const PropertyPath &path ); - - /// Delegates to Properties[] if the value is a Properties. - const Value &operator[]( unsigned int index ) const; - - /// Delegates to Properties[] if the value is a Properties. - const Value &operator[]( const PropertyPath &path ) const; - - /// Delegates to Properties::append if the value is a Properties. - Properties &append( const Value &value ); - - CppTL::ConstString toString() const; - - bool operator ==( const Value &other ) const; - bool operator !=( const Value &other ) const; - - private: - - struct Storage - { - Type type_; - - union - { - bool boolValue_; - StorageInt intValue_; - StorageUInt uintValue_; - double realValue_; - char *stringValue_; - Properties *propertiesValue_; - }; - }; - - void throwBadCast() const; - - Storage guts_; - }; - - - class OPENTEST_API PropertyPath - { - public: - typedef CppTL::AnyEnumerator<CppTL::ConstString> NamesEnum; - - PropertyPath( const CppTL::ConstString &path, - char separator = '/' ); - - PropertyPath( const char *path, - char separator = '/' ); - - NamesEnum names() const; - - PropertyPath &add( const CppTL::ConstString &name ); - - PropertyPath &addPath( const PropertyPath &path ); - - PropertyPath parent() const; - - const CppTL::ConstString &name() const; - - bool isEmpty() const; - - private: - typedef std::deque<CppTL::ConstString> PropertyNames; - - PropertyPath( const PropertyNames &names ); - - void initialize( const char *path, - char separator ); - - private: - PropertyNames names_; - }; - - class OPENTEST_API Property - { - public: - Property( const CppTL::ConstString &name, - const Value &value ); - - const CppTL::ConstString &name() const; - - const Value &value() const; - - Value &value(); - - bool operator ==( const Property &other ) const; - bool operator !=( const Property &other ) const; - - private: - CppTL::ConstString name_; - Value value_; - }; - - - /* - Properties properties; - properties["result"]["status"]["general"] = "pass"; // pass, fail, skip - properties["result/status/general"] = "pass"; // pass, fail, skip - properties["result"]["status"]["detail"] = "success"; - properties["result"]["duration"] = 163.5; - properties["log"].append( "log line 1" ); - */ - class OPENTEST_API Properties - { - public: - typedef CppTL::AnyEnumerator<Value> ValueEnum; - typedef CppTL::AnyEnumerator<Property> PropertyEnum; - typedef CppTL::AnyEnumerator<CppTL::ConstString> NameEnum; - - Properties(); - - Properties( const Property &property ); - - Properties( const Properties &other ); - - Properties &operator =( const Properties &other ); - - ~Properties(); - - void swap( Properties &other ); - - void clear(); - - Properties &set( const Property &property ); - - Properties &set( const CppTL::ConstString &name, - const Value &value ); - - Properties &setIfNew( const Property &property ); - - Properties &setIfNew( const CppTL::ConstString &name, - const Value &value ); - - Properties &mergeReplacingExisting( const Properties &properties ); - - Properties &mergePreservingExisting( const Properties &properties ); - - bool has( const PropertyPath &path ) const; - - const Property &getProperty( const PropertyPath &path ) const; - - const Value &getValue( const PropertyPath &path ) const; - - const Value &at( unsigned int index ) const; - - Value getValue( const PropertyPath &path, - const Value &defaultValue ) const; - - Value at( unsigned int index, - const Value &defaultValue ) const; - - const Value &operator[]( unsigned int index ) const; - - const Value &operator[]( const PropertyPath &path ) const; - - Value &operator[]( unsigned int index ); - - /// If there no property named 'name' then create it and initialize it to - /// an empty Properties => allow chaining ["a"]["b"] to create a tree. - Value &operator[]( const PropertyPath &path ); - - Properties &remove( unsigned int index ); - - Properties &remove( const PropertyPath &path ); - - Properties &append( const Value &value ); - - unsigned int listSize() const; - - bool hasList() const; - - PropertiesAccessor accessor() const; - - ValueEnum listValues() const; - - NameEnum names() const; - - PropertyEnum properties() const; - - CppTL::ConstString toString() const; - - bool operator ==( const Properties &other ) const; - bool operator !=( const Properties &other ) const; - - private: - // Notes: can not use std::map because VC++6 implementation is buggy and cause - // crash when exposed in DLL. - typedef std::vector<Property> PropertyList; - typedef std::deque<Value> IndexedProperties; - - struct NameAdaptor - { - typedef CppTL::ConstString result_type; - - CppTL::ConstString operator()( const Property &property ) const - { - return property.name(); - } - }; - - PropertyList::iterator find( const CppTL::ConstString &name ); - - PropertyList::const_iterator find( const CppTL::ConstString &name ) const; - - PropertyList::const_iterator resolvePath( const PropertyPath &path ) const; - - Properties *tryGetProperties( const PropertyPath &path ); - - const Properties *tryGetProperties( const PropertyPath &path ) const; - - Properties &makeProperties( const PropertyPath &path ); - - void checkPathNotEmpty( const PropertyPath &path ) const; - - CppTL::ConstString toString( const CppTL::ConstString &prefix ) const; - - PropertyList properties_; - IndexedProperties indexedProperties_; - }; - - - - /// Helper to navigate the property tree in read-only mode and - /// avoid testing if every single node exist. - class OPENTEST_API PropertiesAccessor - { - public: - PropertiesAccessor( const Properties *properties = 0 ); - - PropertiesAccessor operator[]( unsigned int index ) const; - - PropertiesAccessor operator[]( const PropertyPath &path ) const; - - const Properties &properties() const; - - bool isValid() const; - - bool has( const PropertyPath &path ) const; - - const Property &getProperty( const PropertyPath &path ) const; - - /// If the current node is valid then returns the value of the property - /// named 'name', otherwise returns an empty value. - Value getValue( const PropertyPath &path ) const; - - Value at( unsigned int index ) const; - - /// If current node is valid and has a property named 'name' returns its - /// values, otherwise returns the 'defaultValue'. - Value getValue( const PropertyPath &path, - const Value &defaultValue ) const; - - /// If current node is valid and has a indexed value at the specified - //// index returns its values, otherwise returns the 'defaultValue'. - Value at( unsigned int index, - const Value &defaultValue ) const; - - Properties::ValueEnum listValues() const; - - unsigned int listSize() const; - - bool hasList() const; - - private: - const Properties *properties_; - }; - - } // namespace OpenTest #endif // OPENTEST_PROPERTIES_H_INCLUDED --- 3,8 ---- # include <opentest/forwards.h> + # include <json/value.h> # include <cpptl/conststring.h> #endif // OPENTEST_PROPERTIES_H_INCLUDED Index: interfaces.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/opentest/interfaces.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** interfaces.h 6 Sep 2005 07:31:42 -0000 1.3 --- interfaces.h 7 Nov 2005 22:43:07 -0000 1.4 *************** *** 5,8 **** --- 5,9 ---- # include <opentest/properties.h> # include <map> + # include <deque> # include <vector> |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:25
|
Update of /cvsroot/cppunit/cppunit2/include/json In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/include/json Added Files: autolink.h config.h forwards.h json.h reader.h value.h writer.h Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. --- NEW FILE: config.h --- #ifndef JSON_CONFIG_H_INCLUDED # define JSON_CONFIG_H_INCLUDED /// If defined, indicates that json library is embedded in CppTL library. # define JSON_IN_CPPTL 1 /// If defined, indicates that json may leverage CppTL library # define JSON_USE_CPPTL 1 # ifdef JSON_IN_CPPTL # include <cpptl/config.h> # ifndef JSON_USE_CPPTL # define JSON_USE_CPPTL 1 # endif # endif # ifdef JSON_IN_CPPTL # define JSON_API CPPTL_API # elif defined(JSON_DLL_BUILD) # define JSON_API __declspec(dllexport) # elif defined(JSON_DLL) # define JSON_API __declspec(dllimport) # else # define JSON_API # endif #endif // JSON_CONFIG_H_INCLUDED --- NEW FILE: value.h --- #ifndef CPPTL_JSON_H_INCLUDED # define CPPTL_JSON_H_INCLUDED # include "forwards.h" # include <string> # include <map> # include <vector> # ifdef JSON_USE_CPPTL # include <cpptl/forwards.h> # endif namespace Json { class Value; /** \brief Type of the value held by a Value object. */ enum ValueType { nullValue = 0, ///< 'null' value intValue, ///< signed integer value uintValue, ///< unsigned integer value realValue, ///< double value stringValue, ///< UTF-8 string value booleanValue, ///< bool value arrayValue, ///< array value (ordered list) objectValue ///< object value (collection of name/value pairs). }; enum CommentPlacement { commentBefore = 0, ///< a comment placed on the line before a value commentAfterOnSameLine, ///< a comment just after a value on the same line commentAfter, ///< a comment on the line after a value (only make sense for root value) numberOfCommentPlacement }; # ifdef JSON_USE_CPPTL typedef CppTL::AnyEnumerator<const char *> EnumMemberNames; typedef CppTL::AnyEnumerator<const Value &> EnumValues; # endif /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value. * * This class is a discriminated union wrapper that can represents a: * - signed integer [range: Value::minInt - Value::maxInt] * - unsigned integer (range: 0 - Value::maxUInt) * - double * - UTF-8 string * - boolean * - 'null' * - an ordered list of Value * - collection of name/value pairs (javascript object) * * The type of the held value is represented by a #ValueType and * can be obtained using type(). * * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. * Non const methods will automatically create the a #nullValue element * if it does not exist. * The sequence of an #arrayValue will be automatically resize and initialized * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue. * * The get() methods can be used to obtanis default value in the case the required element * does not exist. * * It is possible to iterate over the list of a #objectValue values using * the getMemberNames() method. */ class JSON_API Value { public: typedef std::vector<std::string> Members; typedef int Int; typedef unsigned int UInt; static const Value null; static const Int minInt; static const Int maxInt; static const UInt maxUInt; Value( ValueType type = nullValue ); Value( Int value ); Value( UInt value ); Value( double value ); Value( const char *value ); Value( const std::string &value ); # ifdef JSON_USE_CPPTL Value( const CppTL::ConstString &value ); # endif Value( bool value ); Value( const Value &other ); ~Value(); Value &operator=( const Value &other ); void swap( Value &other ); ValueType type() const; bool operator <( const Value &other ) const; bool operator <=( const Value &other ) const; bool operator >=( const Value &other ) const; bool operator >( const Value &other ) const; bool operator ==( const Value &other ) const; bool operator !=( const Value &other ) const; int compare( const Value &other ); const char *asCString() const; std::string asString() const; # ifdef JSON_USE_CPPTL CppTL::ConstString asConstString() const; # endif Int asInt() const; UInt asUInt() const; double asDouble() const; bool asBool() const; bool isBool() const; bool isInt() const; bool isUInt() const; bool isIntegral() const; bool isDouble() const; bool isNumeric() const; bool isString() const; bool isArray() const; bool isObject() const; bool isConvertibleTo( ValueType other ) const; /// Number of values in array or object UInt size() const; /// Removes all object members and array elements. void clear(); /// Resize the array to size elements. /// New elements are initialized to null. /// May only be called on nullValue or arrayValue. void resize( UInt size ); /// Access an array element (zero based index ). /// If the array contains less than index element, then null value are inserted /// in the array so that its size is index+1. Value &operator[]( UInt index ); /// Access an array element (zero based index ) const Value &operator[]( UInt index ) const; /// If the array contains at least index+1 elements, returns the element value, /// otherwise returns defaultValue. Value get( UInt index, const Value &defaultValue ) const; /// Returns true if index < size(). bool isValidIndex( UInt index ) const; /// Append value to array at the end. /// Equivalent to jsonvalue[jsonvalue.size()] = value; Value &append( const Value &value ); // Access an object value by name, create a null member if it does not exist. Value &operator[]( const char *key ); // Access an object value by name, returns null if there is no member with that name. const Value &operator[]( const char *key ) const; // Access an object value by name, create a null member if it does not exist. Value &operator[]( const std::string &key ); // Access an object value by name, returns null if there is no member with that name. const Value &operator[]( const std::string &key ) const; # ifdef JSON_USE_CPPTL // Access an object value by name, create a null member if it does not exist. Value &operator[]( const CppTL::ConstString &key ); // Access an object value by name, returns null if there is no member with that name. const Value &operator[]( const CppTL::ConstString &key ) const; # endif /// Returns the member named key if it exist, defaultValue otherwise. Value get( const char *key, const Value &defaultValue ) const; /// Returns the member named key if it exist, defaultValue otherwise. Value get( const std::string &key, const Value &defaultValue ) const; # ifdef JSON_USE_CPPTL /// Returns the member named key if it exist, defaultValue otherwise. Value get( const CppTL::ConstString &key, const Value &defaultValue ) const; # endif /// Returns true if the object has a member named key. bool isMember( const char *key ) const; /// Returns true if the object has a member named key. bool isMember( const std::string &key ) const; # ifdef JSON_USE_CPPTL /// Returns true if the object has a member named key. bool isMember( const CppTL::ConstString &key ) const; # endif // Returns a list of the member names. Members getMemberNames() const; # ifdef JSON_USE_CPPTL EnumMemberNames enumMemberNames() const; EnumValues enumValues() const; # endif void setComment( const char *comment, CommentPlacement placement ); void setComment( const std::string &comment, CommentPlacement placement ); bool hasComment( CommentPlacement placement ) const; std::string getComment( CommentPlacement placement ) const; std::string toStyledString() const; private: struct CommentInfo { CommentInfo(); ~CommentInfo(); void setComment( const char *text ); char *comment_; }; struct CZString { enum DuplicationPolicy { noDuplication = 0, duplicate, duplicateOnCopy }; CZString( int index ); CZString( const char *cstr, DuplicationPolicy allocate ); CZString( const CZString &other ); ~CZString(); CZString &operator =( const CZString &other ); bool operator<( const CZString &other ) const; bool operator==( const CZString &other ) const; int index() const; const char *c_str() const; private: void swap( CZString &other ); const char *cstr_; int index_; }; typedef std::map<CZString, Value> ObjectValues; struct MemberNamesTransform { typedef const char *result_type; const char *operator()( const CZString &name ) const { return name.c_str(); } }; union ValueHolder { Int int_; UInt uint_; double real_; bool bool_; char *string_; ObjectValues *map_; } value_; ValueType type_; CommentInfo *comments_; }; /** \brief Experimental and untested: represents an element of the "path" to access a node. */ class PathArgument { public: friend class Path; PathArgument(); PathArgument( Value::UInt index ); PathArgument( const char *key ); PathArgument( const std::string &key ); private: enum Kind { kindNone = 0, kindIndex, kindKey }; std::string key_; Value::UInt index_; Kind kind_; }; /** \brief Experimental and untested: represents a "path" to access a node. * * Syntax: * - "." => root node * - ".[n]" => elements at index 'n' of root node (an array value) * - ".name" => member named 'name' of root node (an object value) * - ".name1.name2.name3" * - ".[0][1][2].name1[3]" * - ".%" => member name is provided as parameter * - ".[%]" => index is provied as parameter */ class Path { public: Path( const std::string &path, const PathArgument &a1 = PathArgument(), const PathArgument &a2 = PathArgument(), const PathArgument &a3 = PathArgument(), const PathArgument &a4 = PathArgument(), const PathArgument &a5 = PathArgument() ); const Value &resolve( const Value &root ) const; Value resolve( const Value &root, const Value &defaultValue ) const; /// Creates the "path" to access the specified node and returns a reference on the node. Value &make( Value &root ) const; private: typedef std::vector<const PathArgument *> InArgs; typedef std::vector<PathArgument> Args; void makePath( const std::string &path, const InArgs &in ); void addPathInArg( const std::string &path, const InArgs &in, InArgs::const_iterator &itInArg, PathArgument::Kind kind ); void invalidPath( const std::string &path, int location ); Args args_; }; } // namespace Json #endif // CPPTL_JSON_H_INCLUDED --- NEW FILE: json.h --- #ifndef JSON_JSON_H_INCLUDED # define JSON_JSON_H_INCLUDED # include "autolink.h" # include "value.h" # include "reader.h" # include "writer.h" #endif // JSON_JSON_H_INCLUDED --- NEW FILE: forwards.h --- #ifndef JSON_FORWARDS_H_INCLUDED # define JSON_FORWARDS_H_INCLUDED # include "config.h" namespace Json { class FastWriter; class Path; class PathArgument; class Reader; class StyledWriter; class Value; } // namespace Json #endif // JSON_FORWARDS_H_INCLUDED --- NEW FILE: reader.h --- #ifndef CPPTL_JSON_READER_H_INCLUDED # define CPPTL_JSON_READER_H_INCLUDED # include "forwards.h" # include "value.h" # include <deque> # include <map> # include <stack> # include <string> namespace Json { class Value; /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value. * * */ class JSON_API Reader { public: typedef char Char; typedef const Char *Location; Reader(); /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document. * \param document UTF-8 encoded string containing the document to read. * \param root [out] Contains the root value of the document if it was * successfully parsed. * \param collectComments \c true to collect comment and allow writing them back during * serialization, \c false to discard comments. * \return \c true if the document was successfully parsed, \c false if an error occurred. */ bool parse( const std::string &document, Value &root, bool collectComments = true ); /** \brief Returns a user friendly string that list errors in the parsed document. * \return Formatted error message with the list of errors with their location in * the parsed document. An empty string is returned if no error occurred * during parsing. */ std::string getFormatedErrorMessages() const; private: enum TokenType { tokenEndOfStream = 0, tokenObjectBegin, tokenObjectEnd, tokenArrayBegin, tokenArrayEnd, tokenString, tokenNumber, tokenTrue, tokenFalse, tokenNull, tokenArraySeparator, tokenMemberSeparator, tokenComment, tokenError }; class Token { public: TokenType type_; Location start_; Location end_; }; class ErrorInfo { public: Token token_; std::string message_; Location extra_; }; typedef std::deque<ErrorInfo> Errors; bool expectToken( TokenType type, Token &token, const char *message ); bool readToken( Token &token ); void skipSpaces(); bool match( Location pattern, int patternLength ); bool readComment(); bool readCStyleComment(); bool readCppStyleComment(); bool readString(); void readNumber(); bool readValue(); bool readObject( Token &token ); bool readArray( Token &token ); bool decodeNumber( Token &token ); bool decodeString( Token &token ); bool decodeString( Token &token, std::string &decoded ); bool decodeDouble( Token &token ); bool decodeUnicodeEscapeSequence( Token &token, Location ¤t, Location end, unsigned int &unicode ); bool addError( const std::string &message, Token &token, Location extra = 0 ); bool recoverFromError( TokenType skipUntilToken ); bool addErrorAndRecover( const std::string &message, Token &token, TokenType skipUntilToken ); void skipUntilSpace(); Value ¤tValue(); Char getNextChar(); void getLocationLineAndColumn( Location location, int &line, int &column ) const; std::string getLocationLineAndColumn( Location location ) const; void addComment( Location begin, Location end, CommentPlacement placement ); void skipCommentTokens( Token &token ); typedef std::stack<Value *> Nodes; Nodes nodes_; Errors errors_; std::string document_; Location begin_; Location end_; Location current_; Location lastValueEnd_; Value *lastValue_; std::string commentsBefore_; bool collectComments_; }; } // namespace Json #endif // CPPTL_JSON_READER_H_INCLUDED --- NEW FILE: writer.h --- #ifndef JSON_WRITER_H_INCLUDED # define JSON_WRITER_H_INCLUDED # include "value.h" # include <deque> # include <string> namespace Json { class Value; /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly). * * The JSON document is written in a single line. It is not intended for 'human' consumption, * but may be usefull to support feature such as RPC where bandwith is limited. * \sa Reader, Value */ class JSON_API FastWriter { public: std::string write( const Value &root ); private: void writeValue( const Value &value ); std::string document_; }; /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way. * * The rules for line break and indent are as follow: * - Object value: * - if empty then print {} without indent and line break * - if not empty the print '{', line break & indent, print one value per line * and then unindent and line break and print '}'. * - Array value: * - if empty then print [] without indent and line break * - if the array contains no object value, empty array or some other value types, * and all the values fit on one lines, then print the array on a single line. * - otherwise, it the values do not fit on one line, or the array contains * object or non empty array, then print one value per line. * * If the Value have comments then they are outputed according to their #CommentPlacement. * * \sa Reader, Value, Value::setComment() */ class JSON_API StyledWriter { public: StyledWriter(); /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format. * \param root Value to serialize. * \return String containing the JSON document that represent the root value. */ std::string write( const Value &root ); private: void writeValue( const Value &value ); void writeArrayValue( const Value &value ); bool isMultineArray( const Value &value ); void pushValue( const std::string &value ); void writeIndent(); void writeWithIndent( const std::string &value ); void indent(); void unindent(); void writeCommentBeforeValue( const Value &root ); void writeCommentAfterValueOnSameLine( const Value &root ); bool hasCommentForValue( const Value &value ); static std::string normalizeEOL( const std::string &text ); typedef std::vector<std::string> ChildValues; ChildValues childValues_; std::string document_; std::string indentString_; int rightMargin_; int indentSize_; bool addChildValues_; }; std::string JSON_API valueToString( Value::Int value ); std::string JSON_API valueToString( Value::UInt value ); std::string JSON_API valueToString( double value ); std::string JSON_API valueToString( bool value ); std::string JSON_API valueToQuotedString( const char *value ); } // namespace Json #endif // JSON_WRITER_H_INCLUDED --- NEW FILE: autolink.h --- #ifndef JSON_AUTOLINK_H_INCLUDED # define JSON_AUTOLINK_H_INCLUDED # include "config.h" # ifdef JSON_IN_CPPTL # include <cpptl/cpptl_autolink.h> # endif # if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL) # define CPPTL_AUTOLINK_NAME "json" # undef CPPTL_AUTOLINK_DLL # ifdef JSON_DLL # define CPPTL_AUTOLINK_DLL # endif # include "autolink.h" # endif #endif // JSON_AUTOLINK_H_INCLUDED |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:24
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/include/cpput Modified Files: assertenum.h stringize.h test.h Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: test.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/test.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test.h 6 Aug 2005 22:24:53 -0000 1.7 --- test.h 7 Nov 2005 22:43:07 -0000 1.8 *************** *** 30,39 **** CppTL::ConstString description() const { ! return info().getValue("configuration/description", "" ).asString(); } CppTL::ConstString name() const { ! return info().getValue( "configuration/name", "" ).asString(); } --- 30,39 ---- CppTL::ConstString description() const { ! return info_.get("configuration/description", "" ).asConstString(); } CppTL::ConstString name() const { ! return info_.get( "configuration/name", "" ).asConstString(); } *************** *** 45,49 **** double timeOut() const { ! return info().getValue( "configuration/timeOut", 0.0 ).asReal(); } --- 45,49 ---- double timeOut() const { ! return info_.get( "configuration/timeOut", 0.0 ).asDouble(); } *************** *** 52,69 **** void setName( const CppTL::ConstString &name ) { ! info()["configuration/name"] = name; } ! OpenTest::PropertiesAccessor info() const ! { ! return info_.accessor(); ! } /// @warning You must never change the name of the test after /// registering the test or scheduling it for running. ! OpenTest::Properties &info() ! { ! return info_; ! } /// Returns \c true if the class is derived from AbstractTestSuite. --- 52,69 ---- void setName( const CppTL::ConstString &name ) { ! info_["configuration/name"] = name; } ! //OpenTest::PropertiesAccessor info() const ! //{ ! // return info_.accessor(); ! //} /// @warning You must never change the name of the test after /// registering the test or scheduling it for running. ! //OpenTest::Properties &info() ! //{ ! // return info_; ! //} /// Returns \c true if the class is derived from AbstractTestSuite. Index: assertenum.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/assertenum.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** assertenum.h 6 Sep 2005 07:18:48 -0000 1.8 --- assertenum.h 7 Nov 2005 22:43:07 -0000 1.9 *************** *** 28,32 **** struct DeRefComparator { ! bool operator()( AType *a, BType *b ) const { return a == b || --- 28,32 ---- struct DeRefComparator { ! bool operator()( const AType *a, const BType *b ) const { return a == b || *************** *** 35,38 **** --- 35,48 ---- }; + template<class AType + ,class BType> + struct RefComparator + { + bool operator()( AType a, BType b ) const + { + return equalityTest( a, b ); + } + }; + # ifndef CPPUT_NO_DEFAULT_ENUM_ITEM_STRINGIZE template<typename ItemType> Index: stringize.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/stringize.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** stringize.h 6 Sep 2005 07:31:42 -0000 1.7 --- stringize.h 7 Nov 2005 22:43:07 -0000 1.8 *************** *** 46,49 **** --- 46,67 ---- }; + template<class ValueType> + struct RefStringizer + { + std::string operator()( ValueType value ) const + { + return stringize( value ); + } + }; + + template<class ValueType> + struct DerefStringizer + { + std::string operator()( ValueType value ) const + { + return stringize( *value ); + } + }; + // ------------------- convertToString ------------------------------- // User should overload getStdString() to support their own string types. |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:24
|
Update of /cvsroot/cppunit/cppunit2/makefiles/vs71 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/makefiles/vs71 Modified Files: cpptl_lib.vcproj cppunit2.sln cpput_lib.vcproj opentest_lib.vcproj Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: opentest_lib.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs71/opentest_lib.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** opentest_lib.vcproj 6 Sep 2005 07:35:12 -0000 1.1 --- opentest_lib.vcproj 7 Nov 2005 22:43:07 -0000 1.2 *************** *** 150,162 **** RelativePath="..\..\include\opentest\testplan.h"> </File> - <File - RelativePath="..\..\include\opentest\testrunner.h"> - </File> - <File - RelativePath="..\..\src\opentest\texttestdriver.cpp"> - </File> - <File - RelativePath="..\..\include\opentest\texttestdriver.h"> - </File> </Files> <Globals> --- 150,153 ---- Index: cppunit2.sln =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs71/cppunit2.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cppunit2.sln 6 Sep 2005 07:35:12 -0000 1.1 --- cppunit2.sln 7 Nov 2005 22:43:07 -0000 1.2 *************** *** 28,31 **** --- 28,32 ---- GlobalSection(SolutionConfiguration) = preSolution Debug = Debug + dummy = dummy Release = Release EndGlobalSection *************** *** 33,52 **** --- 34,63 ---- {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Debug.ActiveCfg = Debug|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Debug.Build.0 = Debug|Win32 + {4037D758-74CD-412B-B67C-BA3CA89FEF28}.dummy.ActiveCfg = Debug|Win32 + {4037D758-74CD-412B-B67C-BA3CA89FEF28}.dummy.Build.0 = Debug|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Release.ActiveCfg = Release|Win32 {4037D758-74CD-412B-B67C-BA3CA89FEF28}.Release.Build.0 = Release|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Debug.ActiveCfg = Debug|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Debug.Build.0 = Debug|Win32 + {79273A0D-700E-4AFA-B7F2-14D4CC325521}.dummy.ActiveCfg = Debug|Win32 + {79273A0D-700E-4AFA-B7F2-14D4CC325521}.dummy.Build.0 = Debug|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Release.ActiveCfg = Release|Win32 {79273A0D-700E-4AFA-B7F2-14D4CC325521}.Release.Build.0 = Release|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Debug.ActiveCfg = Debug|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Debug.Build.0 = Debug|Win32 + {2506991E-13CA-49C9-8686-AACDE35C21B6}.dummy.ActiveCfg = Debug|Win32 + {2506991E-13CA-49C9-8686-AACDE35C21B6}.dummy.Build.0 = Debug|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Release.ActiveCfg = Release|Win32 {2506991E-13CA-49C9-8686-AACDE35C21B6}.Release.Build.0 = Release|Win32 {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D}.Debug.ActiveCfg = Debug|Win32 {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D}.Debug.Build.0 = Debug|Win32 + {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D}.dummy.ActiveCfg = Debug|Win32 + {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D}.dummy.Build.0 = Debug|Win32 {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D}.Release.ActiveCfg = Release|Win32 {6F7EEF30-F58C-4AEF-8406-AAA16D6D384D}.Release.Build.0 = Release|Win32 {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.Debug.ActiveCfg = Debug|Win32 {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.Debug.Build.0 = Debug|Win32 + {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.dummy.ActiveCfg = Debug|Win32 + {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.dummy.Build.0 = Debug|Win32 {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.Release.ActiveCfg = Release|Win32 {FA200A48-CBCD-4A3D-8CA4-5F083610B696}.Release.Build.0 = Release|Win32 Index: cpput_lib.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs71/cpput_lib.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cpput_lib.vcproj 6 Sep 2005 07:35:12 -0000 1.1 --- cpput_lib.vcproj 7 Nov 2005 22:43:07 -0000 1.2 *************** *** 207,213 **** </File> <File - RelativePath="..\..\src\cpput\properties.cpp"> - </File> - <File RelativePath="..\..\src\cpput\registry.cpp"> </File> --- 207,210 ---- Index: cpptl_lib.vcproj =================================================================== RCS file: /cvsroot/cppunit/cppunit2/makefiles/vs71/cpptl_lib.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cpptl_lib.vcproj 6 Sep 2005 07:35:12 -0000 1.1 --- cpptl_lib.vcproj 7 Nov 2005 22:43:07 -0000 1.2 *************** *** 103,175 **** </References> <Files> ! <File ! RelativePath="..\..\include\cpptl\any.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\atomiccounter.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\bimap.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\config.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\conststring.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\enumerator.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\enumstringizer.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\format.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\forwards.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\functor.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\intrusiveptr.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\reflection.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\reflection.inl"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\reflectionimpl10.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\scopedptr.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\sharedptr.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\stringtools.h"> ! </File> ! <File ! RelativePath="..\..\src\cpptl\thread.cpp"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\thread.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\typeinfo.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\typename.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\typetraits.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\yaml.h"> ! </File> </Files> <Globals> --- 103,201 ---- </References> <Files> ! <Filter ! Name="json" ! Filter=""> ! <File ! RelativePath="..\..\include\json\autolink.h"> ! </File> ! <File ! RelativePath="..\..\include\json\config.h"> ! </File> ! <File ! RelativePath="..\..\include\json\forwards.h"> ! </File> ! <File ! RelativePath="..\..\include\json\json.h"> ! </File> ! <File ! RelativePath="..\..\src\cpptl\json_reader.cpp"> ! </File> ! <File ! RelativePath="..\..\src\cpptl\json_value.cpp"> ! </File> ! <File ! RelativePath="..\..\src\cpptl\json_writer.cpp"> ! </File> ! <File ! RelativePath="..\..\include\json\reader.h"> ! </File> ! <File ! RelativePath="..\..\include\json\value.h"> ! </File> ! <File ! RelativePath="..\..\include\json\writer.h"> ! </File> ! </Filter> ! <Filter ! Name="cpptl" ! Filter=""> ! <File ! RelativePath="..\..\include\cpptl\any.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\atomiccounter.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\config.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\conststring.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\enumerator.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\forwards.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\functor.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\intrusiveptr.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\reflection.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\reflection.inl"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\reflectionimpl10.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\scopedptr.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\sharedptr.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\stringtools.h"> ! </File> ! <File ! RelativePath="..\..\src\cpptl\thread.cpp"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\thread.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\typeinfo.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\typename.h"> ! </File> ! <File ! RelativePath="..\..\include\cpptl\typetraits.h"> ! </File> ! </Filter> </Files> <Globals> |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:24
|
Update of /cvsroot/cppunit/cppunit2/src/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/src/cpput Modified Files: SConscript lighttestrunner.cpp testinfo.cpp Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: SConscript =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/SConscript,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SConscript 8 Aug 2005 22:10:21 -0000 1.9 --- SConscript 7 Nov 2005 22:43:08 -0000 1.10 *************** *** 7,11 **** extendeddata.cpp lighttestrunner.cpp - properties.cpp registry.cpp testcase.cpp --- 7,10 ---- Index: lighttestrunner.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/lighttestrunner.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** lighttestrunner.cpp 11 Aug 2005 07:18:24 -0000 1.8 --- lighttestrunner.cpp 7 Nov 2005 22:43:08 -0000 1.9 *************** *** 155,159 **** const OpenTest::Properties &testData = failure.testData(); report_ += "Test data type: " + failure.testDataType() + "\n"; ! report_ += testData.toString() + "\n"; } report_ += "\n"; --- 155,159 ---- const OpenTest::Properties &testData = failure.testData(); report_ += "Test data type: " + failure.testDataType() + "\n"; ! report_ += testData.toStyledString() + "\n"; } report_ += "\n"; *************** *** 165,172 **** { report_ += "Log:\n"; ! if ( log.isConvertibleTo( OpenTest::Value::vtString ) ) report_ += log.asString(); else ! report_ += log.toString(); if ( report_[ report_.length() -1 ] != '\n' ) report_ += "\n\n"; --- 165,172 ---- { report_ += "Log:\n"; ! if ( log.isConvertibleTo( Json::stringValue ) ) report_ += log.asString(); else ! report_ += log.toStyledString(); if ( report_[ report_.length() -1 ] != '\n' ) report_ += "\n\n"; Index: testinfo.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpput/testinfo.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** testinfo.cpp 11 Aug 2005 07:18:24 -0000 1.15 --- testinfo.cpp 7 Nov 2005 22:43:08 -0000 1.16 *************** *** 113,117 **** { buffer += "Test data type: " + testDataType() + "\n"; ! buffer += testData_.toString() + "\n"; } return buffer; --- 113,117 ---- { buffer += "Test data type: " + testDataType() + "\n"; ! buffer += testData_.toStyledString() + "\n"; } return buffer; |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:24
|
Update of /cvsroot/cppunit/cppunit2/include/cpptl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/include/cpptl Modified Files: enumerator.h Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: enumerator.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpptl/enumerator.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** enumerator.h 23 Feb 2005 22:07:39 -0000 1.7 --- enumerator.h 7 Nov 2005 22:43:07 -0000 1.8 *************** *** 238,242 **** { CPPTL_ENUMERATOR_CHECK_CURRENT; ! return *static_cast<const value_type *>(0); } --- 238,242 ---- { CPPTL_ENUMERATOR_CHECK_CURRENT; ! throw StopEnumerationError(); } *************** *** 851,854 **** --- 851,867 ---- + template<class ValueType> + class AddressOfAdaptor + { + public: + typedef ValueType *value_type; + + value_type operator()( const ValueType &value ) const + { + return &value; + } + }; + + namespace Enum { *************** *** 995,998 **** --- 1008,1022 ---- + template<class EnumeratorType> + TransformEnumerator< AddressOfAdaptor<CPPTL_TYPENAME EnumeratorType::value_type>, + EnumeratorType > + addressOfTransform( const EnumeratorType &enumerator ) + { + typedef AddressOfAdaptor<CPPTL_TYPENAME EnumeratorType::value_type> Adaptor; + typedef TransformEnumerator< Adaptor, EnumeratorType > EnumType; + return EnumType( enumerator, adaptor ); + } + + template<class EnumeratorType ,class Predicate> *************** *** 1151,1154 **** --- 1175,1186 ---- + template<class EnumeratorType> + AnyEnumerator<CPPTL_TYPENAME EnumeratorType::value_type *> + anyAddressOfTransform( const EnumeratorType &enumerator ) + { + return any( addressOfTransform( enumerator ) ); + } + + template<class EnumeratorType ,class Predicate> |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:24
|
Update of /cvsroot/cppunit/cppunit2/examples/log_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/examples/log_demo Modified Files: main.cpp Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/log_demo/main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.cpp 11 Aug 2005 07:38:44 -0000 1.2 --- main.cpp 7 Nov 2005 22:43:07 -0000 1.3 *************** *** 1,5 **** #include <examples/common/examplecommon.h> #include <cpput/testcase.h> - #include <opentest/texttestdriver.h> #include <opentest/properties.h> #include <cpptl/stringtools.h> --- 1,4 ---- |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:24
|
Update of /cvsroot/cppunit/cppunit2/examples/stringize_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871/examples/stringize_demo Modified Files: main.cpp Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/examples/stringize_demo/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.cpp 6 Sep 2005 07:47:36 -0000 1.1 --- main.cpp 7 Nov 2005 22:43:07 -0000 1.2 *************** *** 1,5 **** #include <examples/common/examplecommon.h> #include <cpput/testcase.h> - #include <opentest/texttestdriver.h> #include <opentest/properties.h> #include <cpptl/stringtools.h> --- 1,4 ---- |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:43:23
|
Update of /cvsroot/cppunit/cppunit2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30871 Modified Files: sconstruct Log Message: - replaced usage of OpenTest::Properties with Json::Value. Json::Value provides a simpler interface and a standard *simple* serialization format. - jsoncpp has been inlined in CppTL to make deploy easier and remove an external dependency. Index: sconstruct =================================================================== RCS file: /cvsroot/cppunit/cppunit2/sconstruct,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** sconstruct 6 Sep 2005 07:31:42 -0000 1.16 --- sconstruct 7 Nov 2005 22:43:06 -0000 1.17 *************** *** 74,78 **** env.Exit(1) ! env.Append( CPPPATH = '#include', LIBPATH = lib_dir ) --- 74,78 ---- env.Exit(1) ! env.Append( CPPPATH = ['#include', '#dependencies/jsoncpp/include'], LIBPATH = lib_dir ) |
From: Baptiste L. <bl...@us...> - 2005-11-07 22:36:08
|
Update of /cvsroot/cppunit/cppunit2/include/json In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29901/include/json Log Message: Directory /cvsroot/cppunit/cppunit2/include/json added to the repository |
From: Baptiste L. <bl...@us...> - 2005-11-07 08:58:45
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2645 Modified Files: configure.in Log Message: * release 1.11.4 Index: configure.in =================================================================== RCS file: /cvsroot/cppunit/cppunit/configure.in,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** configure.in 14 Oct 2005 07:12:57 -0000 1.81 --- configure.in 7 Nov 2005 08:58:37 -0000 1.82 *************** *** 16,20 **** CPPUNIT_MAJOR_VERSION=1 CPPUNIT_MINOR_VERSION=11 ! CPPUNIT_MICRO_VERSION=2 CPPUNIT_INTERFACE_AGE=0 CPPUNIT_BINARY_AGE=0 --- 16,20 ---- CPPUNIT_MAJOR_VERSION=1 CPPUNIT_MINOR_VERSION=11 ! CPPUNIT_MICRO_VERSION=4 CPPUNIT_INTERFACE_AGE=0 CPPUNIT_BINARY_AGE=0 |
From: Baptiste L. <bl...@us...> - 2005-11-06 16:58:29
|
Update of /cvsroot/cppunit/cppunit/examples/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590/examples/simple Modified Files: ExampleTestCase.cpp ExampleTestCase.h Log Message: * include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms. Index: ExampleTestCase.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/simple/ExampleTestCase.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ExampleTestCase.cpp 13 Oct 2005 20:13:15 -0000 1.4 --- ExampleTestCase.cpp 6 Nov 2005 16:58:21 -0000 1.5 *************** *** 30,40 **** - void ExampleTestCase::testDivideByZero() - { - int zero = 0; - int result = 8 / zero; - } - - void ExampleTestCase::testEquals() { --- 30,33 ---- Index: ExampleTestCase.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/simple/ExampleTestCase.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ExampleTestCase.h 11 Mar 2003 20:06:28 -0000 1.6 --- ExampleTestCase.h 6 Nov 2005 16:58:21 -0000 1.7 *************** *** 17,21 **** CPPUNIT_TEST( anotherExample ); CPPUNIT_TEST( testAdd ); - CPPUNIT_TEST( testDivideByZero ); CPPUNIT_TEST( testEquals ); CPPUNIT_TEST_SUITE_END(); --- 17,20 ---- *************** *** 32,36 **** void anotherExample(); void testAdd(); - void testDivideByZero(); void testEquals(); }; --- 31,34 ---- |
From: Baptiste L. <bl...@us...> - 2005-11-06 16:58:29
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590/include/cppunit/config Modified Files: SourcePrefix.h Log Message: * include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms. Index: SourcePrefix.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/config/SourcePrefix.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SourcePrefix.h 13 Oct 2005 20:13:15 -0000 1.1 --- SourcePrefix.h 6 Nov 2005 16:58:21 -0000 1.2 *************** *** 6,9 **** --- 6,12 ---- #ifdef _MSC_VER #pragma warning(disable: 4018 4284 4146) + #if _MSC_VER >= 1400 + #pragma warning(disable: 4996) // sprintf is deprecated + #endif #endif |
From: Baptiste L. <bl...@us...> - 2005-11-06 16:58:29
|
Update of /cvsroot/cppunit/cppunit/examples/msvc6/HostApp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590/examples/msvc6/HostApp Modified Files: ExampleTestCase.cpp ExampleTestCase.h Log Message: * include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms. Index: ExampleTestCase.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/msvc6/HostApp/ExampleTestCase.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ExampleTestCase.cpp 17 Sep 2001 21:27:15 -0000 1.6 --- ExampleTestCase.cpp 6 Nov 2005 16:58:21 -0000 1.7 *************** *** 29,38 **** - void ExampleTestCase::testDivideByZero () - { - int zero = 0; - int result = 8 / zero; - } - void ExampleTestCase::testEquals () --- 29,32 ---- Index: ExampleTestCase.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/msvc6/HostApp/ExampleTestCase.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ExampleTestCase.h 11 Mar 2003 20:06:27 -0000 1.5 --- ExampleTestCase.h 6 Nov 2005 16:58:21 -0000 1.6 *************** *** 17,21 **** CPPUNIT_TEST( anotherExample ); CPPUNIT_TEST( testAdd ); - CPPUNIT_TEST( testDivideByZero ); CPPUNIT_TEST( testEquals ); CPPUNIT_TEST_SUITE_END(); --- 17,20 ---- *************** *** 33,39 **** void anotherExample (); void testAdd (); - void testDivideByZero (); void testEquals (); - }; --- 32,36 ---- |
From: Baptiste L. <bl...@us...> - 2005-11-06 16:58:29
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590/include/cppunit Modified Files: TestAssert.h Log Message: * include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms. Index: TestAssert.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/TestAssert.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** TestAssert.h 27 Oct 2005 19:34:11 -0000 1.28 --- TestAssert.h 6 Nov 2005 16:58:21 -0000 1.29 *************** *** 77,81 **** --- 77,85 ---- #endif // #ifdef DBL_DIG char buffer[128]; + #ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning. + sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x); + #else sprintf(buffer, "%.*g", precision, x); + #endif return buffer; } |
From: Baptiste L. <bl...@us...> - 2005-11-06 16:58:29
|
Update of /cvsroot/cppunit/cppunit/examples/DumperPlugIn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590/examples/DumperPlugIn Modified Files: DumperPlugIn.cpp Log Message: * include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms. Index: DumperPlugIn.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/DumperPlugIn/DumperPlugIn.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DumperPlugIn.cpp 27 Aug 2002 21:51:14 -0000 1.4 --- DumperPlugIn.cpp 6 Nov 2005 16:58:21 -0000 1.5 *************** *** 63,65 **** CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( DumperPlugIn ); ! CPPUNIT_TESTPLUGIN_MAIN(); \ No newline at end of file --- 63,65 ---- CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( DumperPlugIn ); ! CPPUNIT_PLUGIN_IMPLEMENT_MAIN(); \ No newline at end of file |
From: Baptiste L. <bl...@us...> - 2005-11-06 16:58:28
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590 Modified Files: ChangeLog NEWS Log Message: * include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms. Index: NEWS =================================================================== RCS file: /cvsroot/cppunit/cppunit/NEWS,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** NEWS 15 Jul 2005 19:04:22 -0000 1.92 --- NEWS 6 Nov 2005 16:58:20 -0000 1.93 *************** *** 1,3 **** ! New in CppUnit 1.11.0: ---------------------- --- 1,3 ---- ! New in CppUnit 1.11.4: ---------------------- *************** *** 72,75 **** --- 72,77 ---- instead of AM_PATH_CPPUNIT(1.9.0)" + + - Visual Studio 2005: removed deprecated warning. * Documentation: Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.241 retrieving revision 1.242 diff -C2 -d -r1.241 -r1.242 *** ChangeLog 27 Oct 2005 19:34:11 -0000 1.241 --- ChangeLog 6 Nov 2005 16:58:20 -0000 1.242 *************** *** 1,2 **** --- 1,20 ---- + 2005-11-06 Baptiste Lepilleur <gai...@fr...> + * include/cppunit/config/SourcePrefix.h: disable warning #4996 + (sprintf is deprecated) for visual studio 2005. + + * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for + visual studio 2005. + + * examples/ClockerPlugIn/ClockerPlugIn.cpp + * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed + wrong macro usage to implement DllMain. + + * examples/msvc6/HostApp/ExamplesTestCase.h + * examples/msvc6/HostApp/ExamplesTestCase.cpp + * examples/simple/ExamplesTestCase.h + * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case + as it cause some crash on some platforms. + + 2005-10-27 Baptiste Lepilleur <gai...@fr...> * include/cppunit/TestAssert.h: added missing #include <stdio.h> |
From: Baptiste L. <bl...@us...> - 2005-11-06 16:58:28
|
Update of /cvsroot/cppunit/cppunit/examples/ClockerPlugIn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3590/examples/ClockerPlugIn Modified Files: ClockerModel.cpp ClockerPlugIn.cpp Log Message: * include/cppunit/config/SourcePrefix.h: disable warning #4996 (sprintf is deprecated) for visual studio 2005. * include/cppunit/TestAssert.h: use sprintf_s instead of sprintf for visual studio 2005. * examples/ClockerPlugIn/ClockerPlugIn.cpp * examples/DumperPlugIn/DumperPlugIn.cpp: use SourcePrefix.h. Fixed wrong macro usage to implement DllMain. * examples/msvc6/HostApp/ExamplesTestCase.h * examples/msvc6/HostApp/ExamplesTestCase.cpp * examples/simple/ExamplesTestCase.h * examples/simple/ExamplesTestCase.cpp: removed divideByZero test case as it cause some crash on some platforms. Index: ClockerPlugIn.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/ClockerPlugIn/ClockerPlugIn.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ClockerPlugIn.cpp 13 Oct 2005 20:13:15 -0000 1.5 --- ClockerPlugIn.cpp 6 Nov 2005 16:58:20 -0000 1.6 *************** *** 76,78 **** CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( ClockerPlugIn ); ! CPPUNIT_TESTPLUGIN_MAIN(); \ No newline at end of file --- 76,78 ---- CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( ClockerPlugIn ); ! CPPUNIT_PLUGIN_IMPLEMENT_MAIN(); \ No newline at end of file Index: ClockerModel.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/ClockerPlugIn/ClockerModel.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClockerModel.cpp 14 Jul 2002 19:48:31 -0000 1.2 --- ClockerModel.cpp 6 Nov 2005 16:58:20 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- // ////////////////////////////////////////////////////////////////////////// #include "ClockerModel.h" + #include <cppunit/config/SourcePrefix.h> |
From: Baptiste L. <bl...@us...> - 2005-10-27 20:22:41
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/portability In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32059/include/cppunit/portability Modified Files: Stream.h Log Message: * made sure Portability.h is included... Index: Stream.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/portability/Stream.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Stream.h 13 Oct 2005 21:34:38 -0000 1.5 --- Stream.h 27 Oct 2005 20:22:33 -0000 1.6 *************** *** 8,11 **** --- 8,13 ---- // custom stream). + #include <cppunit/Portability.h> + #if defined( CPPUNIT_NO_STREAM ) |
From: Baptiste L. <bl...@us...> - 2005-10-27 19:34:22
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18198 Modified Files: ChangeLog Log Message: * include/cppunit/TestAssert.h: added missing #include <stdio.h> Index: ChangeLog =================================================================== RCS file: /cvsroot/cppunit/cppunit/ChangeLog,v retrieving revision 1.240 retrieving revision 1.241 diff -C2 -d -r1.240 -r1.241 *** ChangeLog 13 Oct 2005 21:25:39 -0000 1.240 --- ChangeLog 27 Oct 2005 19:34:11 -0000 1.241 *************** *** 1,2 **** --- 1,5 ---- + 2005-10-27 Baptiste Lepilleur <gai...@fr...> + * include/cppunit/TestAssert.h: added missing #include <stdio.h> + 2005-07-30 Baptiste Lepilleur <gai...@fr...> * include/cppunit/config/SourcePrefix.h: added, prefix added at begining of sources |
From: Baptiste L. <bl...@us...> - 2005-10-27 19:34:20
|
Update of /cvsroot/cppunit/cppunit/include/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18198/include/cppunit Modified Files: TestAssert.h Log Message: * include/cppunit/TestAssert.h: added missing #include <stdio.h> Index: TestAssert.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/TestAssert.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** TestAssert.h 8 Nov 2004 20:12:58 -0000 1.27 --- TestAssert.h 27 Oct 2005 19:34:11 -0000 1.28 *************** *** 6,10 **** #include <cppunit/Asserter.h> #include <cppunit/portability/Stream.h> ! #include <float.h> // For struct assertion_traits<double> --- 6,10 ---- #include <cppunit/Asserter.h> #include <cppunit/portability/Stream.h> ! #include <stdio.h> #include <float.h> // For struct assertion_traits<double> |
From: Baptiste L. <bl...@us...> - 2005-10-14 07:43:24
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24851/include/cppunit/config Modified Files: Makefile.am Log Message: * removed most warning when compiling with vc++ 6sp6. Index: Makefile.am =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/config/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 25 Jun 2004 10:54:46 -0000 1.3 --- Makefile.am 14 Oct 2005 07:43:14 -0000 1.4 *************** *** 7,9 **** config-msvc6.h \ SelectDllLoader.h \ ! CppUnitApi.h --- 7,10 ---- config-msvc6.h \ SelectDllLoader.h \ ! CppUnitApi.h \ ! SourcePrefix.h |
From: Baptiste L. <bl...@us...> - 2005-10-14 07:13:05
|
Update of /cvsroot/cppunit/cppunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19968/doc Modified Files: makedox.bat Log Message: * bumped version to 1.11.2 Index: makedox.bat =================================================================== RCS file: /cvsroot/cppunit/cppunit/doc/makedox.bat,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** makedox.bat 9 Jul 2005 07:42:38 -0000 1.9 --- makedox.bat 14 Oct 2005 07:12:58 -0000 1.10 *************** *** 1,3 **** ! SET VERSION=1.10.4 doxygen CppUnit-win.dox xcopy FAQ html /Y --- 1,3 ---- ! SET VERSION=1.11.2 doxygen CppUnit-win.dox xcopy FAQ html /Y |
From: Baptiste L. <bl...@us...> - 2005-10-14 07:13:05
|
Update of /cvsroot/cppunit/cppunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19968 Modified Files: configure.in Log Message: * bumped version to 1.11.2 Index: configure.in =================================================================== RCS file: /cvsroot/cppunit/cppunit/configure.in,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** configure.in 15 Jul 2005 19:31:08 -0000 1.80 --- configure.in 14 Oct 2005 07:12:57 -0000 1.81 *************** *** 16,20 **** CPPUNIT_MAJOR_VERSION=1 CPPUNIT_MINOR_VERSION=11 ! CPPUNIT_MICRO_VERSION=0 CPPUNIT_INTERFACE_AGE=0 CPPUNIT_BINARY_AGE=0 --- 16,20 ---- CPPUNIT_MAJOR_VERSION=1 CPPUNIT_MINOR_VERSION=11 ! CPPUNIT_MICRO_VERSION=2 CPPUNIT_INTERFACE_AGE=0 CPPUNIT_BINARY_AGE=0 |
From: Baptiste L. <bl...@us...> - 2005-10-13 21:34:47
|
Update of /cvsroot/cppunit/cppunit/include/cppunit/portability In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1628/include/cppunit/portability Modified Files: Stream.h Log Message: * better float & double string conversion Index: Stream.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/portability/Stream.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Stream.h 8 Nov 2004 20:14:35 -0000 1.4 --- Stream.h 13 Oct 2005 21:34:38 -0000 1.5 *************** *** 93,96 **** --- 93,97 ---- virtual ~OStream() { + flush(); } *************** *** 170,174 **** { char buffer[128]; ! sprintf( buffer, "%f", double(v) ); return write( buffer ); } --- 171,175 ---- { char buffer[128]; ! sprintf( buffer, "%.16g", double(v) ); return write( buffer ); } *************** *** 177,181 **** { char buffer[128]; ! sprintf( buffer, "%f", v ); return write( buffer ); } --- 178,182 ---- { char buffer[128]; ! sprintf( buffer, "%.16g", v ); return write( buffer ); } *************** *** 184,188 **** { char buffer[128]; ! sprintf( buffer, "%f", double(v) ); return write( buffer ); } --- 185,189 ---- { char buffer[128]; ! sprintf( buffer, "%.16g", double(v) ); return write( buffer ); } |