certik / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

version 0.2.5 Test failed #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build all with vc 2008 or 2010
2. run test
3. failed (in addition for not implemented) 8.2, 8.4

Parser tests: 47/47 passed
Emitter tests: 58/58 passed
Spec test 6.25 failed: Invalid Verbatim Tags
  not implemented yet
Spec test 6.27 failed: Invalid Tag Shorthands
  not implemented yet
Spec test 8.2 failed: Block Indentation Header
  Assert failed: doc[1] == "\n\n# detected\n"
Spec test 8.4 failed: Chomping Trailing Lines
  Assert failed: doc["keep"] == "# text\n"
Spec test 8.4 failed: Empty Scalar Chomping
  Assert failed: doc["strip"] == ""
Spec tests: 87/92 passed

What is the expected output? What do you see instead?
I expect that all test except marked as "not implemented" will passed.

What version of the product are you using? On what operating system?
version 0.2.5

Please provide any additional information below.
And addition: warnings must be eliminated:

1>c:\lib\yaml-cpp-0.2.5\src\tag.cpp(48): warning C4715: 'YAML::Tag::Translate' 
: not all control paths return a value
1>c:\lib\yaml-cpp-0.2.5\src\scanner.cpp(280): warning C4715: 
'YAML::Scanner::GetStartTokenFor' : not all control paths return a value

1>src\stream.cpp(410): warning C4244: '=' : conversion from 'std::streamsize' 
to 'size_t', possible loss of data

and in vc2010 (may through conversion):
Generating Code...
1>C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning 
MSB8012: TargetPath(C:\lib\yaml-cpp-0.2.5\Debug\yamlcpp.lib) does not match the 
Library's OutputFile property value (C:\lib\yaml-cpp-0.2.5\lib\yamlcppd.lib). 
This may cause your project to build incorrectly. To correct this, please make 
sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the 
value specified in %(Lib.OutputFile).
1>C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1153,5): warning 
MSB8012: TargetName(yamlcpp) does not match the Library's OutputFile property 
value (yamlcppd). This may cause your project to build incorrectly. To correct 
this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property 
values match the value specified in %(Lib.OutputFile).
1>  yamlcpp.vcxproj -> C:\lib\yaml-cpp-0.2.5\Debug\yamlcpp.lib

Original issue reported on code.google.com by Rider...@gmail.com on 3 Mar 2011 at 3:14

GoogleCodeExporter commented 9 years ago
Yeah, these tests haven't passed yet. They will be fixed.

As for the warnings, the first two are fixed in the trunk. The conversion from 
std::streamsize to size_t, I've never seen before, but I guess streamsize is 
signed, so it's worried about truncating. I'll take a look.

Original comment by jbe...@gmail.com on 3 Mar 2011 at 6:12

GoogleCodeExporter commented 9 years ago
No. Streamsize is __int64.

03.03.2011 21:13 ������������ yaml-cpp@googlecode.com �������:

Original comment by Rider...@gmail.com on 3 Mar 2011 at 8:04

GoogleCodeExporter commented 9 years ago
Right, so it's signed. (Actually, streamsize doesn't *have* to be 64-bit - C++ 
doesn't mandate sizes other than char.) But size_t is unsigned (probably also 
64-bit).

Original comment by jbe...@gmail.com on 3 Mar 2011 at 8:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
streambuf::sgetn() never returns negative values so a static_cast would fix 
this warning safely (assuming YAML_PREFETCH_SIZE will fit in size_t). Patch 
attached

Original comment by mattberg...@gmail.com on 14 Feb 2012 at 1:43

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, patched r2d1d27679f20.

Original comment by jbe...@gmail.com on 14 Feb 2012 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by jbe...@gmail.com on 24 Jan 2015 at 9:28