-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement validation of extended fields
- Loading branch information
Showing
10 changed files
with
352 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef ZSERIO_EXTENDED_FIELD_EXCEPTION_H_INC | ||
#define ZSERIO_EXTENDED_FIELD_EXCEPTION_H_INC | ||
|
||
#include "zserio/ValidationException.h" | ||
|
||
namespace zserio | ||
{ | ||
|
||
/** | ||
* Exception thrown when a check of an extended field fails. | ||
*/ | ||
class ExtendedFieldException : public ValidationException | ||
{ | ||
public: | ||
using ValidationException::ValidationException; | ||
}; | ||
|
||
} // namespace zserio | ||
|
||
#endif // ifndef ZSERIO_EXTENDED_FIELD_EXCEPTION_H_INC |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "gtest/gtest.h" | ||
#include "zserio/ExtendedFieldException.h" | ||
|
||
namespace zserio | ||
{ | ||
|
||
TEST(ExtendedFieldExceptionTest, correctTypeAfterAppend) | ||
{ | ||
ASSERT_THROW( | ||
{ | ||
throw ExtendedFieldException() | ||
<< "Test that appending using operator<< persists the exception type!"; | ||
}, | ||
ExtendedFieldException); | ||
} | ||
|
||
} // namespace zserio |
This file contains 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
Oops, something went wrong.