(folly) Account for different vsnprintf behavior on OSX in test
authorHans Fugal <fugalh@fb.com>
Thu, 8 Jan 2015 22:55:34 +0000 (14:55 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:05 +0000 (11:01 -0800)
commit7f0c4bda69ff762d7d611cf95ba1153b5f1e446b
treef3f427e08b8df35d3eec4336415f8dae7471e5fc
parent6d079c1421885038d14a1f65e71c010836b6c94c
(folly) Account for different vsnprintf behavior on OSX in test

Summary: Apparently there is some dispute about the correct thing for `snprintf(buf, len, "bogus%", "foo")` to return. OSX says 5, Linux says -1. The code in `folly/String.cpp` depends on -1 to throw the exception this test was expecting.

Test Plan: make check on OSX

Reviewed By: chip@fb.com

Subscribers: exa, folly-diffs@

FB internal diff: D1770970

Tasks: 5936226

Signature: t1:1770970:1420680750:bafae2aa8327a52013e68af64a163323244ca03b
folly/test/StringTest.cpp