Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ static string FormatObject(object value)
{
return "null";
}
if (value is Type)
{
return ((Type) value).Name;
}
if (value is string)
{
return "\"" + value + "\"";
Expand Down Expand Up @@ -350,6 +354,10 @@ static string FormatObjectPossessive(object value)
{
return "null";
}
if (value is Type)
{
return ((Type)value).Name;
}
if (value is string)
{
return "\"" + value + "\"";
Expand Down
8 changes: 8 additions & 0 deletions lib/powerassert/powerassert/PowerAssertTests/EndToEndTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ public void PrintResults()
Console.Out.WriteLine(s);
}

[Test]
[Ignore("This test will fail for demo purposes")]
public void RunTypeOfExpression()
{
int x = 1;
PAssert.IsTrue(() => x.GetType() == typeof(string));
}

[Test]
[Ignore("This test will fail for demo purposes")]
public void RunComplexExpression()
Expand Down