Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
a6fe313d
Commit
a6fe313d
authored
May 22, 2012
by
Jesse Beder
Browse files
Removed key/value error checks (since we don't require asking them)
parent
41235831
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
45 deletions
+0
-45
include/yaml-cpp/exceptions.h
include/yaml-cpp/exceptions.h
+0
-4
test/emittertests.cpp
test/emittertests.cpp
+0
-41
No files found.
include/yaml-cpp/exceptions.h
View file @
a6fe313d
...
@@ -62,10 +62,6 @@ namespace YAML
...
@@ -62,10 +62,6 @@ namespace YAML
const
char
*
const
INVALID_ANCHOR
=
"invalid anchor"
;
const
char
*
const
INVALID_ANCHOR
=
"invalid anchor"
;
const
char
*
const
INVALID_ALIAS
=
"invalid alias"
;
const
char
*
const
INVALID_ALIAS
=
"invalid alias"
;
const
char
*
const
INVALID_TAG
=
"invalid tag"
;
const
char
*
const
INVALID_TAG
=
"invalid tag"
;
const
char
*
const
EXPECTED_KEY_TOKEN
=
"expected key token"
;
const
char
*
const
EXPECTED_VALUE_TOKEN
=
"expected value token"
;
const
char
*
const
UNEXPECTED_KEY_TOKEN
=
"unexpected key token"
;
const
char
*
const
UNEXPECTED_VALUE_TOKEN
=
"unexpected value token"
;
}
}
class
Exception
:
public
std
::
runtime_error
{
class
Exception
:
public
std
::
runtime_error
{
...
...
test/emittertests.cpp
View file @
a6fe313d
...
@@ -986,43 +986,6 @@ namespace Test
...
@@ -986,43 +986,6 @@ namespace Test
out
<<
YAML
::
Alias
(
"new
\n
line"
);
out
<<
YAML
::
Alias
(
"new
\n
line"
);
out
<<
YAML
::
EndSeq
;
out
<<
YAML
::
EndSeq
;
}
}
void
MissingKey
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredError
)
{
desiredError
=
YAML
::
ErrorMsg
::
EXPECTED_KEY_TOKEN
;
out
<<
YAML
::
BeginMap
;
out
<<
YAML
::
Key
<<
"key"
<<
YAML
::
Value
<<
"value"
;
out
<<
"missing key"
<<
YAML
::
Value
<<
"value"
;
out
<<
YAML
::
EndMap
;
}
void
MissingValue
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredError
)
{
desiredError
=
YAML
::
ErrorMsg
::
EXPECTED_VALUE_TOKEN
;
out
<<
YAML
::
BeginMap
;
out
<<
YAML
::
Key
<<
"key"
<<
"value"
;
out
<<
YAML
::
EndMap
;
}
void
UnexpectedKey
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredError
)
{
desiredError
=
YAML
::
ErrorMsg
::
UNEXPECTED_KEY_TOKEN
;
out
<<
YAML
::
BeginSeq
;
out
<<
YAML
::
Key
<<
"hi"
;
out
<<
YAML
::
EndSeq
;
}
void
UnexpectedValue
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredError
)
{
desiredError
=
YAML
::
ErrorMsg
::
UNEXPECTED_VALUE_TOKEN
;
out
<<
YAML
::
BeginSeq
;
out
<<
YAML
::
Value
<<
"hi"
;
out
<<
YAML
::
EndSeq
;
}
}
}
namespace
{
namespace
{
...
@@ -1178,10 +1141,6 @@ namespace Test
...
@@ -1178,10 +1141,6 @@ namespace Test
RunEmitterErrorTest
(
&
Emitter
::
BadSingleQuoted
,
"bad single quoted string"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
BadSingleQuoted
,
"bad single quoted string"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
InvalidAnchor
,
"invalid anchor"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
InvalidAnchor
,
"invalid anchor"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
InvalidAlias
,
"invalid alias"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
InvalidAlias
,
"invalid alias"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
MissingKey
,
"missing key"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
MissingValue
,
"missing value"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
UnexpectedKey
,
"unexpected key"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
UnexpectedValue
,
"unexpected value"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
BadLocalTag
,
"bad local tag"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
BadLocalTag
,
"bad local tag"
,
passed
,
total
);
std
::
cout
<<
"Emitter tests: "
<<
passed
<<
"/"
<<
total
<<
" passed
\n
"
;
std
::
cout
<<
"Emitter tests: "
<<
passed
<<
"/"
<<
total
<<
" passed
\n
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment