You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@@ -407,21 +407,21 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
void NestedStackTraces (int depth)
|
||||
void NestedStackTraces (int depth)
|
||||
{
|
||||
if (depth == 0)
|
||||
throw new ArgumentException ("Depth 0 exception");
|
||||
|
||||
if (depth == 0)
|
||||
throw new ArgumentException ("Depth 0 exception");
|
||||
|
||||
try {
|
||||
NestedStackTraces (depth - 1);
|
||||
} catch (Exception exc) {
|
||||
throw new Exception (String.Format ("Depth {0} exception, expect nested", depth), exc);
|
||||
}
|
||||
}
|
||||
void StacktraceToStateTest (int depth)
|
||||
{
|
||||
try {
|
||||
NestedStackTraces (depth);
|
||||
NestedStackTraces (depth - 1);
|
||||
} catch (Exception exc) {
|
||||
throw new Exception (String.Format ("Depth {0} exception, expect nested", depth), exc);
|
||||
}
|
||||
}
|
||||
void StacktraceToStateTest (int depth)
|
||||
{
|
||||
try {
|
||||
NestedStackTraces (depth);
|
||||
} catch (Exception exc) {
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
var convert = monoType.GetMethod("ExceptionToState", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
@@ -432,41 +432,41 @@ namespace MonoTests.System
|
||||
var portable_hash = output.Item2;
|
||||
var unportable_hash = output.Item3;
|
||||
|
||||
// To see what we're working with
|
||||
// Console.WriteLine (dump);
|
||||
|
||||
// To see what we're working with
|
||||
// Console.WriteLine (dump);
|
||||
|
||||
Assert.IsTrue (portable_hash != 0, "#1");
|
||||
Assert.IsTrue (unportable_hash != 0, "#2");
|
||||
Assert.IsTrue (dump.Length > 0, "#3");
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure that we can convert a stacktrace to a
|
||||
// telemetry message
|
||||
//
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateBase ()
|
||||
{
|
||||
StacktraceToStateTest (0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateDeeper ()
|
||||
{
|
||||
StacktraceToStateTest (2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateOverflow ()
|
||||
{
|
||||
// We set a limit on 15 nested exceptions. Lets check that we're valid
|
||||
// when exceeding that limit.
|
||||
StacktraceToStateTest (20);
|
||||
}
|
||||
|
||||
// Ensure that we can convert a stacktrace to a
|
||||
// telemetry message
|
||||
//
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateBase ()
|
||||
{
|
||||
StacktraceToStateTest (0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateDeeper ()
|
||||
{
|
||||
StacktraceToStateTest (2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("NotOnWindows")]
|
||||
public void StacktraceToStateOverflow ()
|
||||
{
|
||||
// We set a limit on 15 nested exceptions. Lets check that we're valid
|
||||
// when exceeding that limit.
|
||||
StacktraceToStateTest (20);
|
||||
}
|
||||
|
||||
void DumpSingle ()
|
||||
{
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
|
Reference in New Issue
Block a user