• Nigel Tao's avatar
    Clarify JSONValueDeserializerTest assertion · 332d1570
    Nigel Tao authored
    Prior to this commit, the code looked like:
        etc.Deserialize(&error_code, etc);
        ASSERT_EQ(foo, error_code);
    which could be misinterpreted as testing that a side-effect of calling
    Deserialize was setting error_code to foo. In fact, error_code was set
    to foo before the Deserialize call, and what was actually being tested
    was that Deserialize has no effect on error_code when there's no error.
    That should be clearer after this commit.
    
    Bug: 1069271
    Change-Id: I20045c24c098f792a87622762d58fb085f6fbaaa
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2248395Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Commit-Queue: Nigel Tao <nigeltao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#779796}
    332d1570
json_value_serializer_unittest.cc 17.1 KB