mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 04:48:53 +00:00
Dictionary test
This commit is contained in:
parent
25f77c5e18
commit
ef489b0f2f
3 changed files with 21 additions and 2 deletions
|
|
@ -15,10 +15,27 @@ namespace Cosmos.Compiler.Tests.Bcl.System.Collections.Generic
|
|||
{
|
||||
{"echo", "ECHO"},
|
||||
{"reboot", "REBOOT" },
|
||||
{"shutdown", "SHUTDOWN"}
|
||||
{"shutdown", "SHUTDOWN"},
|
||||
{"integer", 500}
|
||||
};
|
||||
|
||||
Assert.IsTrue(commands.ContainsKey("echo"), "Dictionary ContainsKey does not work");
|
||||
Assert.IsTrue(commands.ContainsKey("echo"), "Dictionary ContainsKey does not work1");
|
||||
Assert.IsFalse(commands.ContainsKey("musterror"), "Dictionary ContainsKey does not work 2");
|
||||
|
||||
|
||||
|
||||
//String test
|
||||
Assert.IsTrue((string)commands["echo"] == "ECHO", "Dictionary string not work");
|
||||
commands["echo"] = "notEcho";
|
||||
Assert.IsTrue((string)commands["echo"] == "notEcho", "Dictionary string been reset not working");
|
||||
|
||||
|
||||
//Integer test
|
||||
Assert.IsTrue((int)commands["integer"] == 500, "Dictionary integer not working");
|
||||
commands["integer"] = 321;
|
||||
Assert.IsTrue((int)commands["integer"] == 321, "Dictionary integer been reset not working");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
<Reference Include="System.Drawing" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="System\Collections\Generic\DictionaryImpI.cs" />
|
||||
<Compile Include="System\Collections\Generic\EqualityComparerImpl.cs" />
|
||||
<Compile Include="System\DecimalImpl.cs" />
|
||||
<Compile Include="System\Mda.cs" />
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ namespace Cosmos.System.Plugs.System.Collections.Generic
|
|||
{
|
||||
public static EqualityComparer<T> CreateComparer()
|
||||
{
|
||||
|
||||
throw new Exception("Create comparer not yet implemented!");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue