-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6875ff4
commit cd90e3f
Showing
24 changed files
with
252 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
type TestArray = [ number ]; | ||
|
||
export class ArrayTestSets extends TestSets<TestArray> { | ||
public constructor() { | ||
super([ 0 ], [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ], [ 8 ], [ 9 ]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
export class DateTestSets extends TestSets<Date> { | ||
|
||
public override readonly willSortWithoutComparator = false; | ||
|
||
public constructor() { | ||
super( | ||
new Date(0), | ||
new Date(1), | ||
new Date(2), | ||
new Date(3), | ||
new Date(4), | ||
new Date(5), | ||
new Date(6), | ||
new Date(7), | ||
new Date(8), | ||
new Date(9), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
enum TestEnum { A, B, C, D, E, F, G, H, I, J } | ||
|
||
export class EnumTestSets extends TestSets<TestEnum> { | ||
public constructor() { | ||
super( | ||
TestEnum.A, | ||
TestEnum.B, | ||
TestEnum.C, | ||
TestEnum.D, | ||
TestEnum.E, | ||
TestEnum.F, | ||
TestEnum.G, | ||
TestEnum.H, | ||
TestEnum.I, | ||
TestEnum.J, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
export class ErrorTestSets extends TestSets<Error> { | ||
public constructor() { | ||
super( | ||
new Error('a'), | ||
new Error('b'), | ||
new Error('c'), | ||
new Error('d'), | ||
new Error('e'), | ||
new Error('f'), | ||
new Error('g'), | ||
new Error('h'), | ||
new Error('i'), | ||
new Error('j'), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
type TestFunction = () => number; | ||
|
||
export class FunctionTestSets extends TestSets<TestFunction> { | ||
public constructor() { | ||
super( | ||
() => 0, | ||
() => 1, | ||
() => 2, | ||
() => 3, | ||
() => 4, | ||
() => 5, | ||
() => 6, | ||
() => 7, | ||
() => 8, | ||
() => 9, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
type TestMap = Map<'id', number>; | ||
|
||
export class MapTestSets extends TestSets<TestMap> { | ||
|
||
public override readonly willSortWithoutComparator = false; | ||
|
||
public constructor() { | ||
super( | ||
new Map([[ 'id', 0 ]]), | ||
new Map([[ 'id', 1 ]]), | ||
new Map([[ 'id', 2 ]]), | ||
new Map([[ 'id', 3 ]]), | ||
new Map([[ 'id', 4 ]]), | ||
new Map([[ 'id', 5 ]]), | ||
new Map([[ 'id', 6 ]]), | ||
new Map([[ 'id', 7 ]]), | ||
new Map([[ 'id', 8 ]]), | ||
new Map([[ 'id', 9 ]]), | ||
); | ||
} | ||
|
||
public override defaultComparator(first: TestMap, second: TestMap): number { | ||
return (first.get('id')! < second.get('id')!) ? -1 : 1; | ||
} | ||
|
||
public override reverseComparator(first: TestMap, second: TestMap): number { | ||
return (first.get('id')! < second.get('id')!) ? 1 : -1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
type TestObject = { readonly id: number }; | ||
|
||
export class ObjectTestSets extends TestSets<TestObject> { | ||
|
||
public override readonly willSortWithoutComparator = false; | ||
|
||
public constructor() { | ||
super( | ||
{ id: 0 }, | ||
{ id: 1 }, | ||
{ id: 2 }, | ||
{ id: 3 }, | ||
{ id: 4 }, | ||
{ id: 5 }, | ||
{ id: 6 }, | ||
{ id: 7 }, | ||
{ id: 8 }, | ||
{ id: 9 }, | ||
); | ||
} | ||
|
||
public override defaultComparator(first: TestObject, second: TestObject): number { | ||
return (first.id < second.id) ? -1 : 1; | ||
} | ||
|
||
public override reverseComparator(first: TestObject, second: TestObject): number { | ||
return (first.id < second.id) ? 1 : -1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { TestSets } from './test-sets.model'; | ||
|
||
export class RegExpTestSets extends TestSets<RegExp> { | ||
public constructor() { | ||
super(/a/, /b/, /c/, /d/, /e/, /f/, /g/, /h/, /i/, /j/); | ||
} | ||
} |
Oops, something went wrong.