]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Don't hardcode the source filename
authorngie <ngie@FreeBSD.org>
Wed, 20 Feb 2019 07:21:22 +0000 (07:21 +0000)
committerngie <ngie@FreeBSD.org>
Wed, 20 Feb 2019 07:21:22 +0000 (07:21 +0000)
commit3bf8c233875f9157038bb43bf04480fbb76cf9a6
treee0649aa2142d69d3b7c852316cbcae15ba13d4e2
parent6c414a2a1680d4518f1c8c1682be93d801d79ff5
Don't hardcode the source filename

In order to compile these tests with different CXXFLAGS, I needed to copy them
to different filenames to trick the compiler. Unfortunately, this triggers a
failure with one of the tests as it hardcodes the path to the test, instead of
relying on the compiler to fill in the path via `__FILE__`.

Using `__FILE__` is standard and works. Rely on it instead of a hardcoded path.
contrib/googletest/googletest/test/googletest-death-test_ex_test.cc