Commit Graph

266 Commits

Author SHA1 Message Date
Jesse Beder
dfa32c7f44 Renamed SpecTest to HandlerSpecTest 2014-03-23 14:06:37 -05:00
Jesse Beder
a4382b1370 Merge from core, plus convert the node spec tests to gtest 2014-03-23 14:02:51 -05:00
Jesse Beder
ace9c49e31 Convert spec tests to gtest with gmock 2014-03-23 12:49:30 -05:00
Jesse Beder
e3f120b99d Add gmock as dependency 2014-03-23 12:04:03 -05:00
Jesse Beder
be85bb3212 Merge from core 2014-03-23 11:55:30 -05:00
Jesse Beder
f6a6f46ba4 Move EmitterTests to gtest 2014-03-23 11:49:32 -05:00
Jesse Beder
da118bbb0d Add test for cloning a null node 2014-03-22 23:29:14 -05:00
Jesse Beder
4b40441cee Run IWYU 2014-03-22 23:14:48 -05:00
Jesse Beder
8d7eb02c46 Merge IWYU from core 2014-03-22 23:08:09 -05:00
Jesse Beder
5fd25df859 Run IWYU 2014-03-22 22:46:04 -05:00
Jesse Beder
d98ab9f342 Merge ostream_wrapper fix from core 2014-03-22 19:27:54 -05:00
Jesse Beder
0fbeac8f4f Add more ostream_wrapper tests 2014-03-22 19:22:23 -05:00
Jesse Beder
396a97050d Fix SEGV in ostream_wrapper 2014-03-22 19:15:49 -05:00
Jesse Beder
9583d1ab07 Merge gtest from core 2014-03-22 19:09:22 -05:00
Jesse Beder
db82302ed0 Add gtest, as separate set of tests (that just follow the ad-hoc tests that already exist) 2014-03-22 19:06:46 -05:00
Jesse Beder
d63ec48c8a Run clang-format 2014-03-22 13:05:03 -05:00
Jesse Beder
3355bbb399 Merge clang-format from core 2014-03-22 13:03:18 -05:00
Jesse Beder
9b4db068bb Run clang-format 2014-03-22 12:49:16 -05:00
Jesse Beder
5b88931143 Fixed bug while reading a single space char 2013-11-10 14:50:35 -06:00
Jesse Beder
25881c4f96 Add ifdef to check if BOOST_FOREACH is defined, and disable tests that use it if it is not available 2013-10-13 11:14:34 -05:00
Jesse Beder
0305ad13e4 Fixed crash when emitting empty node 2013-07-10 08:29:11 -05:00
Jesse Beder
e5aa599b27 Merge null string bug fix from core, plus bug fix regarding use-after-delete for a token that seems to have been ignored. 2013-04-13 18:25:37 -05:00
Jesse Beder
2375f2c66b Fix bug where the string "null" (without quotes) is deserialized as a string, instead of null. 2013-04-13 18:21:06 -05:00
Jesse Beder
895af26226 Fix floating point precision on input. 2013-04-13 13:10:36 -05:00
Jesse Beder
434c6a5697 Add better exception reporting when incorrectly dereferencing an iterator. 2013-04-12 23:41:02 -05:00
Jesse Beder
097ac171c6 Add std::pair conversion specialization. 2013-04-02 21:04:17 -05:00
Jesse Beder
0482463569 Rename clear() to reset(), and it now takes an optional node parameter. 2013-04-02 20:39:54 -05:00
Jesse Beder
6276189716 Merged ? fix from core 2012-11-08 19:12:22 -06:00
Jesse Beder
15b60e2a3b Added failing test for parsing a ? at the start of a value 2012-11-08 19:00:46 -06:00
Jesse Beder
4e1bdd08d3 Removed that failing test - I don't think the parser is correct here 2012-11-08 18:54:53 -06:00
Jesse Beder
490265cf22 Added failing tests for emitter ? at the start of a value 2012-11-08 18:52:54 -06:00
Jesse Beder
bcdda4027f Added Node::clear() function 2012-11-08 18:47:22 -06:00
Jesse Beder
b12e4b0781 Merged from core, rfaef276b1f6e 2012-11-08 18:33:12 -06:00
Jesse Beder
09b4706faf Added force_insert for mapping nodes that doesn't check to see if the key exists already (so it could duplicate keys) 2012-10-31 19:08:09 -05:00
Jesse Beder
1d1d6886cc Fixed typo in the core parser tests 2012-09-15 15:50:44 -07:00
Jesse Beder
823311384f Added free Clone() function for Nodes 2012-07-04 15:26:37 -05:00
Jesse Beder
f29ea4b070 Merged end of map/seq flow fix from core 2012-06-09 14:42:00 -05:00
Jesse Beder
68dd9b5d18 Fixed bug where the parser doesn't find the end of a map or seq flow 2012-06-09 14:39:00 -05:00
Jesse Beder
2d815c5d6a Added extra parser tests for the core; in particular, one that asserts instead of throwing 2012-06-09 14:26:44 -05:00
Jesse Beder
4116d89f2c Merged emitter refactor from core 2012-05-23 15:30:03 -05:00
Jesse Beder
2dd1cf4596 Added compiler flag to compile the generated tests, since gcc takes *forever* to compile them 2012-05-23 15:16:34 -05:00
Jesse Beder
f011975769 Fixed handler macros to remove warnings in gcc 2012-05-23 15:12:36 -05:00
Jesse Beder
288c7e51f2 Added seq/map gen emitter tests 2012-05-23 11:20:36 -05:00
Jesse Beder
1ab9469f10 Added map/seq gen emitter tests, including some failing ones 2012-05-23 11:16:32 -05:00
Jesse Beder
3ddfeff4f5 Added seq gen emitter tests 2012-05-23 11:11:50 -05:00
Jesse Beder
fdfffb0916 Added gen emitter tests 2012-05-23 11:02:42 -05:00
Jesse Beder
c197d822c1 Updated gen emitter tests 2012-05-23 11:00:33 -05:00
Jesse Beder
277132a21f Refactored emitter test template code 2012-05-23 10:56:16 -05:00
Jesse Beder
5af3fc04c6 Registered all the generated emitter tests 2012-05-22 22:17:50 -05:00
Jesse Beder
0fb59c18dd Split test struct and handler macros out for the emitter/spec tests 2012-05-22 22:10:47 -05:00
Jesse Beder
115101d25d Updated emitter test script, and moved handler macros to own include file 2012-05-22 21:59:12 -05:00
Jesse Beder
8d529cbcf2 Started emitting test generator 2012-05-22 19:31:23 -05:00
Jesse Beder
8aabc0766b Fixed indentation test - all emitter tests now pass 2012-05-22 17:56:07 -05:00
Jesse Beder
c664d50d5c Fixed double quote escapes (e.g., \n is now that instead of \x0a) 2012-05-22 17:45:31 -05:00
Jesse Beder
ad275901b2 Switched single quoted test to positive test (since we just convert to double quoted) 2012-05-22 16:59:39 -05:00
Jesse Beder
a6fe313d32 Removed key/value error checks (since we don't require asking them) 2012-05-22 16:57:30 -05:00
Jesse Beder
bc884061e2 Fixed some newline/comma tests 2012-05-22 16:49:09 -05:00
Jesse Beder
b2f9a61c46 Fixed emitter tests with newlines 2012-05-22 16:44:49 -05:00
Jesse Beder
676e0b94ac Fixed flow seq/map indentation 2012-05-22 16:39:03 -05:00
Jesse Beder
cdfbac1fd7 Fixed some tests with the new compact long keys 2012-05-22 15:02:36 -05:00
Jesse Beder
d8bdeb5b51 Added failing test for compact map with newline 2012-05-20 01:31:57 -05:00
Jesse Beder
16fd111a6b Fixed formatting for spec tests 2012-05-20 01:19:27 -05:00
Jesse Beder
f17cfacdbb Updated from core 2012-05-19 22:39:36 -05:00
Jesse Beder
729ac991c7 Added 8.x tests 2012-05-19 22:24:20 -05:00
Jesse Beder
7d57209033 Added 7.x tests 2012-05-19 21:43:22 -05:00
Jesse Beder
4086c285fa Added 6.x tests 2012-05-19 21:08:58 -05:00
Jesse Beder
4245c36a84 Added 5.x tests 2012-05-19 20:40:42 -05:00
Jesse Beder
84b68c3868 Added all the 2.x tests 2012-05-19 18:43:02 -05:00
Jesse Beder
c2b22d6129 Added framework for spectests with event handling 2012-05-19 17:53:43 -05:00
Jesse Beder
c22512649e Copied all files from new-api branch of old repo 2012-05-19 15:34:02 -05:00
Jesse Beder
a183293ff0 Removed old-api tests, added (empty) core spec tests 2012-05-19 01:16:54 -05:00
Jesse Beder
0d32d19ed8 First pass at spearating out a 'core' library from the old api (default) branch 2012-05-19 01:04:43 -05:00
Jesse Beder
01eb370300 Added operator >> overload for Binary 2012-01-21 02:01:37 -06:00
Jesse Beder
1723523c43 Removed the new API from the default branch 2012-01-20 23:50:39 -06:00
Jesse Beder
d772361f15 Fixed hex and oct emitting (it now adds the 0x or 0 prefix) 2012-01-13 00:00:11 -06:00
Jesse Beder
a441e1a14c Added test for new API octal/hex conversion 2012-01-12 23:55:15 -06:00
Jesse Beder
fb0802097c Fixed double -> int conversion (now throws) for old API 2012-01-12 23:52:51 -06:00
Jesse Beder
643ea61a98 Updated new API conversion to handle nan/inf and to throw when the conversion didn't use the entire string (e.g., parsing 1.2 as an integer) 2012-01-12 23:49:05 -06:00
Jesse Beder
d1e4c2640c Added default parameters for the as<> function (new API) 2012-01-12 01:03:31 -06:00
Jesse Beder
8906ae9a0d Fixed bug in parsing escaped newline (it was being clipped like a regular newline) 2012-01-11 17:55:27 -06:00
Jesse Beder
4e350e5808 Removed some extra stuff in the comment/newline in flow map tests, which really should be illegal (since implicit keys can't span multiple lines). It would be impossible to fix if we keep the immediate-output we're doing now - the only way to prevent it would be to hold on to a key's text until we got to the value token to make sure it could be an implicit key 2012-01-11 17:06:27 -06:00
Jesse Beder
0e61ddb6d9 Added parsing emitter tests with the new API, two fail 2012-01-11 16:41:13 -06:00
Jesse Beder
97fa02a484 Disallowed a plain scalar with just a dash 2012-01-11 16:39:24 -06:00
Jesse Beder
5024caa69c Added float/double precision setters 2012-01-11 14:34:04 -06:00
Jesse Beder
812a2dc684 Fixed assignment with an empty node (new API) - a segfault that only showed up in debuggable 2011-12-20 22:19:54 -06:00
Jesse Beder
3099d51ba4 Added single character emitting 2011-11-14 16:23:14 -06:00
Jesse Beder
6f4608ce05 Added missing includes (iostream) for the tests 2011-11-13 16:12:39 -06:00
Jesse Beder
5abfbf5aac Added (unspecified-type) bool conversions for Node (new API) 2011-11-13 16:05:42 -06:00
Jesse Beder
62634f53ec Fixed emitter bug with colon at the end of a scalar in a flow collection 2011-10-31 19:16:17 -05:00
Jesse Beder
b077e8390e Added parser test for single char input (that fails) 2011-10-20 13:53:27 -05:00
Jesse Beder
f6d6c90aa9 Updated old api spectests with common spec examples 2011-09-17 23:57:40 -05:00
Jesse Beder
d9c7bcf32f Set the default build to the old API, and removed the duplicate spec test implementation for the old api 2011-09-17 23:46:48 -05:00
Jesse Beder
f64f619c29 Added bool conversions 2011-09-14 01:48:36 -05:00
Jesse Beder
40c47f6312 Finished adding old spec tests 2011-09-13 14:31:00 -05:00
Jesse Beder
e3d5ec189d Switched YAML::Parse to YAML::Load, and added LoadAll 2011-09-13 14:24:47 -05:00
Jesse Beder
5be19ccbfd Added 7.x and 8.x tests with tags - all that's left is multiple docs in stream 2011-09-13 14:20:32 -05:00
Jesse Beder
98830a4a15 Added 6.x tests with tags 2011-09-13 14:18:00 -05:00
Jesse Beder
3a88c4b4a1 Added IsNull, IsScalar, IsSequence, IsMap functions, so you don't have to query Type() 2011-09-13 14:10:27 -05:00
Jesse Beder
69af9b420a Copied 2.x tests with tags 2011-09-13 14:07:22 -05:00
Jesse Beder
2dfccbb945 Added a convert<> specialization for YAML::_Null (so you can say node[YAML::Null]) 2011-09-13 02:03:56 -05:00
Jesse Beder
a9be4849d8 Copied over the 8.x tests that don't have tags 2011-09-13 01:56:44 -05:00
Jesse Beder
b1100d7c54 Copied over the 7.x tests that don't have tags 2011-09-13 01:46:42 -05:00
Jesse Beder
64e381f2c1 Copied over the 6.x tests that don't have tags 2011-09-13 01:36:27 -05:00
Jesse Beder
f6b728d56c Copied over the 5.x tests 2011-09-13 01:28:32 -05:00
Jesse Beder
edd6650536 Copied over all the 2.x tests that are (a) single doc and (b) don't have tags 2011-09-13 01:23:30 -05:00
Jesse Beder
a04dfdeb07 Factored out spec examples, and sketched skeleton for spec tests for new API 2011-09-12 22:55:37 -05:00
Jesse Beder
1721750d9e Added temp variable tests 2011-09-12 22:09:16 -05:00
Jesse Beder
41533a8c49 Added failing self-reference tests 2011-09-12 12:48:51 -05:00
Jesse Beder
a6e1d4cf74 Added two alias tests 2011-09-12 12:42:23 -05:00
Jesse Beder
5397a93702 Implemented std::map decode (and fixed bug in the Node iterator - the reference_type should be just a plain value, since it's created on-the-fly) 2011-09-12 00:29:39 -05:00
Jesse Beder
b9583dde76 Added reading/writing std::list 2011-09-11 23:18:19 -05:00
Jesse Beder
f22f38f7f2 Added reading/writing std::vector 2011-09-11 23:14:52 -05:00
Jesse Beder
4770ec798c Implemented operator[] specialization, but only const (should the sequence be mutable?) 2011-09-11 21:51:04 -05:00
Jesse Beder
c2a8a2c1f7 Added failing map iterator count test 2011-09-11 17:36:08 -05:00
Jesse Beder
a03af5dd73 Implemented the map size computation 2011-09-11 17:16:26 -05:00
Jesse Beder
ecdd9cc66d Added computing and caching the sequence size 2011-09-11 16:21:36 -05:00
Jesse Beder
3a90454d50 Added some small map tests 2011-09-11 16:02:31 -05:00
Jesse Beder
b4963ab0fa Added a few simple node tests, and the sequence one doesn't pass (let's work now) 2011-09-10 23:31:12 -05:00
Jesse Beder
432268917b Started Node tests (for the new API Node) 2011-09-10 23:22:30 -05:00
Jesse Beder
80cf3c98db Fixed minor things that used the old API, compiles/links/runs\! 2011-09-10 22:59:27 -05:00
Jesse Beder
f7b2247217 Added stubs for spec and parser tests with the new API 2011-09-10 18:05:35 -05:00
Jesse Beder
36c63980b9 Moved old api tests to subfolder 2011-09-10 18:02:07 -05:00
Jesse Beder
c1d75dd4f7 Added notes about the two failing tests - that they're (I think) bugs in the YAML spec 2011-09-06 01:05:14 -05:00
Jesse Beder
dd1eb715c4 Switched YAML::Binary interface to use unsigned chars, not chars 2011-09-06 00:39:31 -05:00
Jesse Beder
fadca5a89d Added overload for operator [] for char * (non-const version) 2011-09-06 00:32:53 -05:00
Jesse Beder
7e129c9b64 Fixed empty string emitter bug (it now with auto-quote it 2011-09-06 00:24:10 -05:00
Jesse Beder
3e94c0a037 Switched the 'pragma once' to only happen on MSVC, or gcc >= 3.4 (it was causing trouble on the sun compiler) 2011-09-06 00:16:03 -05:00
Jesse Beder
d904b600a9 Added test for anchor/alias in flow 2011-08-04 21:50:04 +00:00
Jesse Beder
bacb74e8ec Forced a newline after any comments 2011-08-04 21:47:57 +00:00
Jesse Beder
835b86d9f7 Fixed negative infinity parsing 2011-07-10 18:29:44 +00:00
Jesse Beder
94dc63af04 Added parsing .inf and .nan (and friend) 2011-07-10 16:27:40 +00:00
Jesse Beder
ebdfeb0349 Removed comparison/implicit conversion operators for Node, and renamed Node::Read<T>() to Node::to<T>() 2011-03-15 05:49:56 +00:00
Jesse Beder
f9e1a882e8 Updated for error in spec test 2011-03-04 04:19:34 +00:00
Jesse Beder
681c862f54 Added spec tests through chapter 8, all new ones pass except 8.21, which I think is wrong 2011-03-04 04:14:08 +00:00
Jesse Beder
943d000ab3 Refactored parse.cpp so that VS doesn't complain, added MinSizeRel build setting, and fixed numbering in the spec tests 2011-03-03 20:01:32 +00:00
Jesse Beder
cb632b3968 Added explicit doc start/end tokens for the emitter, and set it so that if you try to write after you've already written a full doc, it writes a doc start and continues 2011-03-03 09:26:12 +00:00
Jesse Beder
b9d4ccd254 Removed the default --- at the start of all emitter output 2011-03-03 08:57:00 +00:00
Jesse Beder
27617ec2be Added parsing of output to emitter tests 2011-03-03 08:04:30 +00:00
Jesse Beder
1f9cc2d327 Compressed the sequence-of-maps emitting (got rid of the unnecessary newline) - issue 61 2011-03-03 03:37:54 +00:00
Jesse Beder
ca5992b971 Merged r444:449 from the node refactoring branch to the trunk 2011-03-03 00:19:26 +00:00
Jesse Beder
39c396ab01 Refactored bool emitting to make it 1) correct for the short bool form and 2) not barf on early versions of VS 2011-03-02 20:55:05 +00:00
Jesse Beder
f34d60ca65 Flipped the include guard and the pragma, and don't use the pragma for early versions of gcc (< 3.4) 2011-03-02 06:11:41 +00:00
Jesse Beder
c65a7dfc7c Switched exception constants to const char * const (from const std::string) so we don't have to construct them all in every translation unit, and switched the exception class to derive from std::runtime_error (so it handles what() for us) 2011-03-02 04:12:57 +00:00
Jesse Beder
be1b14f369 Added Anchor() regex (so that we're not just using Alphanumeric to match anchors), but it's still not 100% right (it shouldn't allow non-printable characters, e.g.). Also fixed a test that was broken along these lines (if a colon immediately follows an anchor, it's part of the anchor) 2011-01-31 17:47:20 +00:00
Jesse Beder
337cb553d0 Fixed emitting colon at end of scalar bug 2010-12-03 21:52:04 +00:00
Jesse Beder
d508203ed8 Implemented binary emitting without the binary tag 2010-10-28 21:53:54 +00:00
Jesse Beder
6b7cb45ac8 Added more tests for the newline, and disallowed newlines after implicit block keys 2010-10-22 03:53:33 +00:00
Jesse Beder
1e4210401f Added YAML::Newline manipulator for the emitter 2010-10-21 22:02:29 +00:00
Jesse Beder
a04e2da1ff Merged the extra tests from other-tags into the trunk (forgot last commit) 2010-10-19 06:51:54 +00:00
Jesse Beder
5b8ca9ce01 Moved all the includes to a subfolder yaml-cpp so they don't interfere with other libraries' includes 2010-10-18 07:05:53 +00:00