This repository was archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Merge 'master' into 'serialization_api' #287
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
dawagner
commented
Oct 15, 2015
Signed-off-by: David Wagner <david.wagner@intel.com>
Travis/Coveralls: fix a syntax error preventing coveralls from running
asString was not returning it's result, leading to more complicated usage. Return the formated string instead of using an output parameter. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
When exporting an element's structure (via the C++ API or via the tuning interface), a spurious "Name" attribute appears for EnumPair nodes, while only "Literal" and "Numerical" attributes should be present. This is because the XML import / export feature assummes the existence of a Name attribute for all XML nodes. The Name default processing can however be skipped from the toXml() methods by calling the base class' childrenToXml() method instead of the toXml() one. Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
This was a workaround of stlport issue. No need anymore since stlport was dropped. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
This check was modified in a previous commit and was wrong since then. But it is also rather useless as it only serves as returning early in case the function is known to be a no-op. Signed-off-by: David Wagner <david.wagner@intel.com>
Utility functions were not tested, introduce unit tests for all functions in Utility.h. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Use `std::string::string(size_t, char)` to simplify the construction of the help message. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Utility.h contain functions that were all part of a CUtility class. Nevertheless this class had no invariant nor asserting any invariant. Thus this class was only used for its namespace aspect. Use a real namespace instead. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Wrong XML "Name" attribute in enum value pairs
- asInteger can be replaced with convertTo - asString can be replaced with std::to_string Signed-off-by: David Wagner <david.wagner@intel.com>
The generic version was converting uint8 as it was a character (uint8_t is an alias to unsigned char on most compiler). Thus converting "1" would return 49 ie '1'. As convertTo is thought as an _numerical_ conversion tool (contrary to boost::lexical_cast for example), forbid considering the input as a character and consider uint8_t (aka unsigned char) as a number exclusively Same for int8_t. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com>
The error message is clearer than when triggering a generic compilation error. Signed-off-by: David Wagner <david.wagner@intel.com>
Utility improvements: - asString now return the formated string leading to usage improvement - Fully unit test Utility.h - Simplify appendTitle implementation - CommandHandler: simplify the message formating
convertTo enhancements: - correctly handle uint8_t and int8_t (deserialize as numerics, not character) - display a nicer error message if conversion is not supported (static_assert) - remove workaround stlport bug, as it is no longer supported
Remove a useless and wrong check in makeEncodable
Remove useless utils static methods in SubsystemObject
Since we want the coverage report to show only the coverage of code that will run in production, we don't want tests to artificially increase the coverage. Signed-off-by: David Wagner <david.wagner@intel.com>
Exclude utility/test from the coverage
dawagner
added a commit
that referenced
this pull request
Oct 15, 2015
Merge 'master' into 'serialization_api'
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.