Skip to content

Commit 6fe5cbe

Browse files
committed
The hunt.logging.ConsoleLogger is deprecated
1 parent 0f160c4 commit 6fe5cbe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+81
-60
lines changed

examples/collection/source/SetDemo.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import hunt.collection.SortedSet;
99
import hunt.collection.TreeSet;
1010

1111
import hunt.Exceptions;
12-
import hunt.logging.ConsoleLogger;
12+
import hunt.logging;
1313
import hunt.util.UnitTest;
1414
import hunt.util.Common;
1515
import hunt.Assert;

examples/collection/source/test/ArrayListDemo.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import hunt.collection.ArrayList;
77
import hunt.collection.Collections;
88
import hunt.collection.List;
99

10-
import hunt.logging.ConsoleLogger;
10+
import hunt.logging;
1111

1212
import std.stdio;
1313
import std.conv;

examples/test/source/app.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import hunt.concurrency.thread;
2-
import hunt.logging.ConsoleLogger;
2+
import hunt.logging;
33
import hunt.system.Locale;
44
import hunt.system.Memory;
55
import hunt.system.TimeZone;
@@ -71,7 +71,7 @@ void main()
7171
// //
7272
// // testUnits!(PathMatcherTest);
7373
// testUnits!(StringTokenizerTest);
74-
testUnits!(ThreadTest);
74+
// testUnits!(ThreadTest);
7575

7676
// // These tests belown will block the test procession.
7777

@@ -83,7 +83,7 @@ void main()
8383
// testUnits!(ScheduledThreadPoolTest);
8484
// testUnits!(ThreadPoolExecutorTest);
8585
// testUnits!(ConverterUtilsTest);
86-
// testUnits!(DeductionTest);
86+
testUnits!(DeductionTest);
8787

8888
// testUnits!(JsonSerializerTest);
8989
// testUnits!(SerializationTest);

examples/test/source/benchmark/LinkedBlockingQueueBench.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import HuntQueue = hunt.collection.Queue;
66
import hunt.io.SimpleQueue;
77

88
import hunt.util.DateTime;
9-
import hunt.logging.ConsoleLogger;
9+
import hunt.logging;
1010
import core.thread;
1111
import std.stdio;
1212

examples/test/source/common.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module common;
33

44
import hunt.serialization.Common;
55
import hunt.serialization.JsonSerializer;
6-
import hunt.logging.ConsoleLogger;
6+
import hunt.logging;
77
import hunt.util.Common;
88
import hunt.util.CompilerHelper;
99
import hunt.util.ObjectUtils;

examples/test/source/test/AtomicTest.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module test.AtomicTest;
22

33
import common;
44
import hunt.concurrency.atomic;
5-
import hunt.logging.ConsoleLogger;
5+
import hunt.logging;
66

77
import core.atomic;
88

examples/test/source/test/ByteBufferTest.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import hunt.util.ByteOrder;
77

88
import hunt.Byte;
99

10-
import hunt.logging.ConsoleLogger;
10+
import hunt.logging;
1111
import hunt.Assert;
1212

1313
import std.conv;

examples/test/source/test/ConverterUtilsTest.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import hunt.util.ConverterUtils;
44

55
import hunt.Assert;
66
import hunt.Exceptions;
7-
import hunt.logging.ConsoleLogger;
7+
import hunt.logging;
88

99
import std.format;
1010

examples/test/source/test/DeductionTest.d

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module test.DeductionTest;
22

33
import common;
4-
import hunt.logging.ConsoleLogger;
4+
import hunt.logging;
55
import hunt.util.Traits;
66

77
import std.conv;
@@ -28,10 +28,10 @@ class DeductionTest {
2828
// deduce(greetings);
2929
// }
3030

31-
{
32-
GreetingBase[2] greetings;
33-
deduce(greetings);
34-
}
31+
// {
32+
// GreetingBase[2] greetings;
33+
// deduce(greetings);
34+
// }
3535
}
3636

3737
// void testConstructor() {
@@ -42,6 +42,10 @@ class DeductionTest {
4242
// deduce(ex);
4343
// }
4444

45+
void testNullable() {
46+
Nullable!int a;
47+
deduce(a);
48+
}
4549

4650

4751
// void test2() {
@@ -51,12 +55,29 @@ class DeductionTest {
5155
}
5256

5357
import std.typecons;
58+
import std.variant;
5459

5560
/**
5661
Flag indicating whether a search is case-sensitive.
5762
*/
5863
alias CaseSensitive = Flag!"caseSensitive";
5964

65+
// void deduce(T : Nullable!U, U)(T a) {
66+
// tracef("T:%s, U: %s", T.stringof, U.stringof);
67+
// }
68+
69+
void deduce(T)(T a) {
70+
static if(is(T : Nullable!U, U)) {
71+
tracef("T:%s, U: %s", T.stringof, U.stringof);
72+
} else {
73+
error("bad");
74+
}
75+
76+
Variant currentColumnValue = 2;
77+
78+
T v = currentColumnValue.coerce!T();
79+
80+
}
6081

6182
void deduce(T, CaseSensitive sensitive = CaseSensitive.yes)(T v) { // if(!is(T == class))
6283
trace(sensitive);

examples/test/source/test/JsonSerializerTest.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import common;
44
import hunt.util.Common;
55

66
import hunt.Exceptions;
7-
import hunt.logging.ConsoleLogger;
7+
import hunt.logging;
88
import hunt.util.UnitTest;
99
import hunt.serialization.Common;
1010
import hunt.serialization.JsonSerializer;

0 commit comments

Comments
 (0)