mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 826231 - Enable FAIL_ON_WARNINGS on MSVC in xpcom/tests. r=ehsan
This commit is contained in:
parent
276e319c96
commit
1d7f495207
@ -12,9 +12,7 @@ relativesrcdir = @relativesrcdir@
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = xpcom
|
||||
ifndef _MSC_VER
|
||||
FAIL_ON_WARNINGS = 1
|
||||
endif # !_MSC_VER
|
||||
|
||||
DIRS = \
|
||||
external \
|
||||
|
@ -13,6 +13,9 @@
|
||||
// gcc errors out if we |try ... catch| with -fno-exceptions, but we
|
||||
// can still test on windows
|
||||
#ifdef _MSC_VER
|
||||
// C4530 will be generated whenever try...catch is used without
|
||||
// enabling exceptions. We know we don't enbale exceptions.
|
||||
# pragma warning( disable : 4530 )
|
||||
# define TRY try
|
||||
# define CATCH(e) catch (e)
|
||||
#else
|
||||
@ -30,7 +33,7 @@ int main() {
|
||||
// (Do some arithmetic with result of v.at() to avoid
|
||||
// compiler warnings for unused variable/result.)
|
||||
rv += v.at(1) ? 1 : 2;
|
||||
} CATCH(const std::out_of_range& e) {
|
||||
} CATCH(const std::out_of_range&) {
|
||||
fputs("TEST-FAIL | TestSTLWrappers.cpp | caught an exception?\n",
|
||||
stderr);
|
||||
return 1;
|
||||
|
@ -61,11 +61,11 @@ public:
|
||||
NS_IMETHOD Handle(const nsAString &name, const JS::Value &result) {
|
||||
if (callbackCount == 9) {
|
||||
CHECK(JSVAL_IS_BOOLEAN(result));
|
||||
CHECK(JSVAL_TO_BOOLEAN(result) == true);
|
||||
CHECK(!!JSVAL_TO_BOOLEAN(result) == true);
|
||||
passed("boolean");
|
||||
} else if (callbackCount == 7) {
|
||||
CHECK(JSVAL_IS_BOOLEAN(result));
|
||||
CHECK(JSVAL_TO_BOOLEAN(result) == false);
|
||||
CHECK(!!JSVAL_TO_BOOLEAN(result) == false);
|
||||
passed("Lock order");
|
||||
} else if (callbackCount == 5) {
|
||||
CHECK(JSVAL_IS_INT(result));
|
||||
|
Loading…
Reference in New Issue
Block a user