Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few tests failed on Visual C++ 2015 #257

Closed
R2RT opened this issue Jun 2, 2016 · 7 comments
Closed

Few tests failed on Visual C++ 2015 #257

R2RT opened this issue Jun 2, 2016 · 7 comments
Labels
platform: visual studio related to MSVC solution: invalid the issue is not related to the library

Comments

@R2RT
Copy link

R2RT commented Jun 2, 2016

Hey,
I want to report that 6 out of 32 tests failed once I compiled it with VC++ 2015.
Fortunatelly there are only 15 assertion fails, mainly with error message "parse error - unexpected end of input".

Tested on x86 and x64 debug and release builds.

I can debug it later if needed.

Log attached:
log.txt

And build log:
build.txt

@nlohmann
Copy link
Owner

nlohmann commented Jun 2, 2016

I'll have a look into this. Just to make sure:

  • Are you using the most recent version from the develop branch?
  • Which version of MSVC are you using?

I'm asking because AppVeyor could execute all tests successfully (https://ci.appveyor.com/project/nlohmann/json) with MSVC 19.0.23918.0.

@nlohmann nlohmann added the platform: visual studio related to MSVC label Jun 2, 2016
@R2RT
Copy link
Author

R2RT commented Jun 2, 2016

Short answers: yes and same as AppVeyor.

  • Commit hash: 04e1e7b
  • Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x64

I'm not sure what more should I check.

@nlohmann
Copy link
Owner

nlohmann commented Jun 5, 2016

From the log, it the following files fail to parse:

  • data/json_tests/pass1.json: exported SGML document text
  • data/json_tests/pass2.json: ASCII text, with no line terminators
  • data/json_tests/pass3.json: ASCII text
  • data/json_testsuite/sample.json: data
  • data/json.org/1.json: ASCII text
  • data/json.org/2.json: ASCII text
  • data/json.org/3.json: ASCII text
  • data/json.org/4.json: ASCII text
  • data/json.org/5.json: ASCII text
  • data/json_nlohmann_tests/all_unicode.json: data
  • data/json_nlohmann_tests/bom.json: UTF-8 Unicode (with BOM) text

I added the output of the file (1) tool, and it seems that these files are (apart from pass2) the only files which are not identified as "ASCII text, with no line terminators".

Just as a test - could you please check whether these files are unchanged on your system?

MD5 (data/json.org/1.json) = ef38b0c11d9f8eed7e016fbf9d21de38
MD5 (data/json.org/2.json) = dde87999f5b4c89cc09afe18da272b0c
MD5 (data/json.org/3.json) = fae5a60df9ab32f256f7799907c9a168
MD5 (data/json.org/4.json) = 28e68f64d8923dce8cb932e88f2b37b9
MD5 (data/json.org/5.json) = 8ca07ca3bd4628cb3e1b7e2f43f56737
MD5 (data/json_nlohmann_tests/all_unicode.json) = 3a04454c43e1754973fd3ffaadb4f6b0
MD5 (data/json_nlohmann_tests/bom.json) = b32e7dfeb8d7a59c47d9c524341c088e
MD5 (data/json_roundtrip/roundtrip01.json) = e3dd48e30aa7bcf81a4d874772465bc6
MD5 (data/json_roundtrip/roundtrip02.json) = b7524fe3dadd564ba8cf18bcb1287e6e
MD5 (data/json_roundtrip/roundtrip03.json) = f9e544f77b7eac7add281ef28ca5559f
MD5 (data/json_roundtrip/roundtrip04.json) = 8d5162ca104fa7e79fe80fd92bb657fb
MD5 (data/json_roundtrip/roundtrip05.json) = a0cc55529e8a5748afb69ba8ebeebad8
MD5 (data/json_roundtrip/roundtrip06.json) = d751713988987e9331980363e24189ce
MD5 (data/json_roundtrip/roundtrip07.json) = 99914b932bd37a50b983c5e7c90ae93b
MD5 (data/json_roundtrip/roundtrip08.json) = ccfcd347d0bf65dc77afe01a3306a96b
MD5 (data/json_roundtrip/roundtrip09.json) = 9bb58f26192e4ba00f01e2e7b136bbd8
MD5 (data/json_roundtrip/roundtrip10.json) = b69743818f0dc393ddf8a07aed5e273f
MD5 (data/json_roundtrip/roundtrip11.json) = edb06daebcc6f079a6dee9a7ed831ea9
MD5 (data/json_roundtrip/roundtrip12.json) = e7c241f1b615ac3bcdd33e646c0446aa
MD5 (data/json_roundtrip/roundtrip13.json) = 4d348f247007f9c12ddb3d4de42d5f1c
MD5 (data/json_roundtrip/roundtrip14.json) = 1aafdcf8438cca9af818eb7c7025feaa
MD5 (data/json_roundtrip/roundtrip15.json) = 35dba5d75538a9bbe0b4da4422759a0e
MD5 (data/json_roundtrip/roundtrip16.json) = f5c21581a6e894a662249d116bb2daaa
MD5 (data/json_roundtrip/roundtrip17.json) = d5baa3a3870cbff47b565d03a3e17162
MD5 (data/json_roundtrip/roundtrip18.json) = 5a98ffefa07c6a06cf1b168bad8a95a0
MD5 (data/json_roundtrip/roundtrip19.json) = fda686559ca62601f247d8aeb70170be
MD5 (data/json_roundtrip/roundtrip20.json) = 07b77f720764bf45af42f9e07b5f7aaf
MD5 (data/json_roundtrip/roundtrip21.json) = b966d44627e0b6b711504a9328f7afdd
MD5 (data/json_roundtrip/roundtrip22.json) = 1af88ba3273672dbaa69d5ffaa5fcffb
MD5 (data/json_roundtrip/roundtrip23.json) = 947818022a084f3ab45d5197372d5c93
MD5 (data/json_roundtrip/roundtrip24.json) = a39db680898d719a6f31cf30c05789e5
MD5 (data/json_roundtrip/roundtrip25.json) = 09b96ceb34ade99c314ac3c59709ff3b
MD5 (data/json_roundtrip/roundtrip26.json) = e22b295461e520da781077b30893f339
MD5 (data/json_roundtrip/roundtrip27.json) = a724a4987cb4ab60e1d6b176002503c1
MD5 (data/json_roundtrip/roundtrip28.json) = 03bb34244ba55a1e6af4a3cd58e67f06
MD5 (data/json_roundtrip/roundtrip29.json) = 27d1a735b529673aa57a3c2d70be88e1
MD5 (data/json_roundtrip/roundtrip30.json) = 262cd2ba88e8792387adeb8ac1d6ef91
MD5 (data/json_roundtrip/roundtrip31.json) = 9be3e1ccf68dbf5db740103871d53b6b
MD5 (data/json_roundtrip/roundtrip32.json) = 66ff5ea7366252c8e1e2fa9789c9d962
MD5 (data/json_tests/fail1.json) = 400e3d2393f7797cf5dbc738ccfc2228
MD5 (data/json_tests/fail10.json) = 1afcc97c783efda1b05803aa411647c0
MD5 (data/json_tests/fail11.json) = c5c9388094c23469158d3172d433d139
MD5 (data/json_tests/fail12.json) = 48cd28fa8137d02cf00eec5e0b0cc911
MD5 (data/json_tests/fail13.json) = 8eb5f1e84eec9f1ca21b98bfc6457215
MD5 (data/json_tests/fail14.json) = 0a6084ef38ee7ada66fef9b9f59417e1
MD5 (data/json_tests/fail15.json) = ef67c8110cca5bcfff5c070a7c071d3b
MD5 (data/json_tests/fail16.json) = b4e9c2c3d88bc98112a37fa45d07553b
MD5 (data/json_tests/fail17.json) = 028280cca3cfd3bbf13f99d1eef74132
MD5 (data/json_tests/fail18.json) = 3f3e994f98e3bdf16417df8fae837690
MD5 (data/json_tests/fail19.json) = 3a93f1d8bfdf2f8b7dc8f7fd7c58787d
MD5 (data/json_tests/fail2.json) = bb8eeb1abcd03416630c46453afdf9d1
MD5 (data/json_tests/fail20.json) = 6480149c5c6d7c9fe662869fd90c75f5
MD5 (data/json_tests/fail21.json) = bb3c20f765fcb22d9340986f1f9bae05
MD5 (data/json_tests/fail22.json) = 0b8e21b578783bcf9b91b7254b0229e0
MD5 (data/json_tests/fail23.json) = e42ae0624e6ef2a76a702f304ec69537
MD5 (data/json_tests/fail24.json) = 54237290d463816171e5f3df5a7dca88
MD5 (data/json_tests/fail25.json) = b9a20d69a70dc40f92f13d29b7d1bac5
MD5 (data/json_tests/fail26.json) = e732685a5d4a6a21b2a03da7564de675
MD5 (data/json_tests/fail27.json) = 69041a5973c6d43ede3891b01d28fa48
MD5 (data/json_tests/fail28.json) = 6d4a7b1b49ff2f89bdfd9d42ebc238c1
MD5 (data/json_tests/fail29.json) = a23fe576a1ce62365c6246a7ad7dd497
MD5 (data/json_tests/fail3.json) = 698e2c9d2334b79969ccd29695e93d08
MD5 (data/json_tests/fail30.json) = 6866178af9153f080f0256f63dd651b9
MD5 (data/json_tests/fail31.json) = e8e67ebbbad29d6248aba51f4b346862
MD5 (data/json_tests/fail32.json) = bfce0ff7b72aee39f7cce40df3c64213
MD5 (data/json_tests/fail33.json) = 835bf3bb717a92a97e1b7e00d5bfb270
MD5 (data/json_tests/fail4.json) = 0b9a4474e4e7afce836a6db639c4ae35
MD5 (data/json_tests/fail5.json) = 804fc4558802e256c1eceb108df960e7
MD5 (data/json_tests/fail6.json) = b762ff8acc8ebd677505c4257a732b4f
MD5 (data/json_tests/fail7.json) = c72ce188fc9a8a12414cf991b72ec3de
MD5 (data/json_tests/fail8.json) = ce51ef5504fa4acba5a497ace5d4649a
MD5 (data/json_tests/fail9.json) = 4553de7b614ab47bd79700be31e138bd
MD5 (data/json_tests/pass1.json) = a15c0039ca490d6058a6f7b96191c5eb
MD5 (data/json_tests/pass2.json) = 5cf1df8b4bbaef4766168b573c13ce40
MD5 (data/json_tests/pass3.json) = b8fda1c2266f683b51d1a7e3fabc8875
MD5 (data/json_testsuite/sample.json) = 2b2cf1f72f00fea6dcad8585a9f8f4e5

@R2RT
Copy link
Author

R2RT commented Jun 6, 2016

I've checked MD5 of test files. I had automatic line ending int Git set to true. (core.autocrlf true), what indeed made few MD5 checksums to not match yours. After disabling it and redownloading MD5 sums do match, but tests outcome is exactly same as previously - 6 tests, 15 assertions failed.

Here are MD5 sums in both cases:
https://docs.google.com/spreadsheets/d/1Rt31guGmLgbO6q18V9yKSCQYgqrO9E2qwebRupY9WkM/pubhtml

@nlohmann
Copy link
Owner

This is strange...

@nlohmann nlohmann added the state: help needed the issue needs help to proceed label Jun 14, 2016
@R2RT
Copy link
Author

R2RT commented Jun 14, 2016

Well, sorry for bothering you... I've debbugged it down to lexer constructor (line 7309).
Getline return empty string and stream is in 'fail' state with errno stating 'file not found'.
And this is it.
Once I called tests from proper directory it worked, all tests passed.

That's interesting though that ifstream does not report any bug ealier.

@R2RT R2RT closed this as completed Jun 14, 2016
@nlohmann nlohmann added solution: invalid the issue is not related to the library and removed state: help needed the issue needs help to proceed labels Jun 14, 2016
@nlohmann
Copy link
Owner

Thanks for reporting back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: visual studio related to MSVC solution: invalid the issue is not related to the library
Projects
None yet
Development

No branches or pull requests

2 participants