endif
check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-multi-netmodule test-cattr-type-load test-reflection-load-with-context test_platform \
- test-console-output test-messages test-env-options test-unhandled-exception-2 $(FEATUREFUL_RUNTIME_TEST) test-process-stress test-pedump rm-empty-logs
+ test-console-output test-env-options test-unhandled-exception-2 $(FEATUREFUL_RUNTIME_TEST) test-process-stress test-pedump rm-empty-logs
check-full: test-sgen check-local
check-parallel: compile-tests check-full
thread6.cs \
appdomain-threadpool-unload.cs \
process-unref-race.cs \
- bug-46661.cs
+ bug-46661.cs \
+ w32message.cs
TEST_CS_SRC_DIST= \
$(BASE_TEST_CS_SRC) \
if AMD64
# #651684
PLATFORM_DISABLED_TESTS = finally_guard.exe
+
+if HOST_WIN32
+PLATFORM_DISABLED_TESTS += w32message.exe
+endif
+
endif
if IA64
if HOST_WIN32
PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe finally_block_ending_in_dead_bb.exe \
- bug-18026.exe monitor.exe threadpool-exceptions5.exe process-unref-race.exe
+ bug-18026.exe monitor.exe threadpool-exceptions5.exe process-unref-race.exe w32message.exe
endif
endif
threadpool-exceptions5.exe \
threadpool-exceptions6.exe
+PLATFORM_DISABLED_TESTS+= w32message.exe
+
# Tests that rely on AppDomain.Unload
PLATFORM_DISABLED_TESTS+= appdomain-async-invoke.exe \
appdomain-exit.exe \
@if which nm > /dev/null; then if nm $(top_builddir)/mono/mini/mono | grep -v $(OK_G_SYMBOLS) | grep 't g_'; then exit 1; else exit 0; fi; fi
endif
-#
-# Tests that the internals in mono/io-layer/messages.c are ok by triggering the
-# code that checks that the table is properly sorted
-#
-if NACL_CODEGEN
-test-messages:
-else
-if HOST_WIN32
-test-messages:
-else
-test-messages: w32message.exe
- > test_messages.zero
- $(with_mono_path) $(JITTEST_PROG_RUN) w32message.exe > w32message.allout 2>&1 && cmp test_messages.zero w32message.allout
-endif
-endif
-
test-env-options:
MONO_ENV_OPTIONS="--version" $(RUNTIME) array-init.exe | grep -q Architecture:
// This test merely creates a Win32Exception that triggers the
// code in mono/io-layer/message.c that validates that the
// error table is propertly sorted
-//
-// If there is output on stderr, we have an error
-//
using System;
using System.ComponentModel;
return new Win32Exception (c).Message;
}
- static void check (int c, string s)
+ static bool check (int c, string s)
{
- if (msg (c) != s)
- Console.WriteLine ("For {0} expected {1} got {2}", c, s, msg (c));
+ if (msg (c) != s) {
+ Console.Error.WriteLine ("For {0} expected {1} got {2}", c, s, msg (c));
+ return false;
+ }
+ return true;
}
- static void Main ()
+ static int Main ()
{
//
// All this test does is instantiate two Win32Exceptions
Exception a = new Win32Exception (99999);
a = new Win32Exception (9805);
- check (2, "Cannot find the specified file");
+ if (!check (2, "Cannot find the specified file"))
+ return 1;
+
+ return 0;
}
-}
\ No newline at end of file
+}