Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
A
Anvoker.Maps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
An Ionescu
Anvoker.Maps
Commits
36ead619
Commit
36ead619
authored
Nov 20, 2018
by
An Ionescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some tidying of NestedIDictionaryBase. No change in features.
parent
5a74f86a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
Assets/Editor/Anvoker.Collections/Maps/NestedIDictionaryBase.cs
.../Editor/Anvoker.Collections/Maps/NestedIDictionaryBase.cs
+11
-11
No files found.
Assets/Editor/Anvoker.Collections/Maps/NestedIDictionaryBase.cs
View file @
36ead619
...
...
@@ -10,14 +10,16 @@ namespace Anvoker.Collections.Maps.Tests
/// <para>This class is inherited from and fed the proper type arguments
/// in order to run all of the tests on a particular class.</para>
/// </summary>
/// <typeparam name="TKey">Type of the key inside the IDictionary.</typeparam>
/// <typeparam name="TKey">Type of the key inside the IDictionary.
/// </typeparam>
/// <typeparam name="TVal">Type of the value inside of the nested collection
/// <see cref="TValCol"/>, which works as the value type of the IDictionary.
/// </typeparam>
/// <typeparam name="TIDict">Type of the dictionary interface.
/// </typeparam>
/// <typeparam name="TValCol">Type of the nested collection used as the value
/// type of the dictionary interface.</typeparam>
/// <typeparam name="TValCol">Type of the nested collection used as the
/// value type of the dictionary interface.
/// </typeparam>
public
class
NestedIDictionaryBase
<
TKey
,
TVal
,
TIDict
,
TValCol
>
where
TIDict
:
IDictionary
<
TKey
,
TValCol
>
where
TValCol
:
IEnumerable
<
TVal
>
...
...
@@ -67,15 +69,14 @@ namespace Anvoker.Collections.Maps.Tests
[
Test
]
public
void
ContainsInitialKeys
()
{
bool
[]
result
=
new
bool
[
initialKeys
.
Length
];
var
fails
=
new
List
<
TKey
>();
bool
testPassed
=
true
;
for
(
int
i
=
0
;
i
<
initialKeys
.
Length
;
i
++)
{
result
[
i
]
=
collection
.
ContainsKey
(
initialKeys
[
i
]);
testPassed
|=
result
[
i
]
;
if
(!
result
[
i
]
)
bool
result
=
collection
.
ContainsKey
(
initialKeys
[
i
]);
testPassed
|=
result
;
if
(!
result
)
{
fails
.
Add
(
initialKeys
[
i
]);
}
...
...
@@ -100,15 +101,14 @@ namespace Anvoker.Collections.Maps.Tests
[
Test
]
public
void
ContainsNoExcludedKeys
()
{
bool
[]
result
=
new
bool
[
excludedKeys
.
Length
];
var
fails
=
new
List
<
TKey
>();
bool
testPassed
=
true
;
for
(
int
i
=
0
;
i
<
initialKeys
.
Length
;
i
++)
{
result
[
i
]
=
collection
.
ContainsKey
(
excludedKeys
[
i
]);
testPassed
|=
!
result
[
i
]
;
if
(
result
[
i
]
)
bool
result
=
collection
.
ContainsKey
(
excludedKeys
[
i
]);
testPassed
|=
!
result
;
if
(
result
)
{
fails
.
Add
(
excludedKeys
[
i
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment