-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more Apple ARM64 platforms: macOS, tvOS, watchOS
- Loading branch information
Showing
16 changed files
with
91 additions
and
160 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
File renamed without changes.
File renamed without changes.
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
4 changes: 4 additions & 0 deletions
4
log4k/src/androidUnitTest/kotlin/saschpe/log4k/LoggedTest.android.kt
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,4 @@ | ||
package saschpe.log4k | ||
|
||
internal actual val expectedListTag: String = "ArrayList" | ||
internal actual val expectedMapTag: String = "SingletonMap" |
File renamed without changes.
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,4 @@ | ||
package saschpe.log4k | ||
|
||
internal actual val expectedListTag: String = "" | ||
internal actual val expectedMapTag: String = "HashMap" |
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,46 @@ | ||
package saschpe.log4k | ||
|
||
import testing.TestLoggerTest | ||
import testing.assertTestLogger | ||
import kotlin.test.Test | ||
|
||
internal expect val expectedListTag: String | ||
internal expect val expectedMapTag: String | ||
|
||
class LoggedTest : TestLoggerTest() { | ||
@Test | ||
fun logged_Pair() { | ||
// Arrange | ||
val pair = Pair("Hello", "World") | ||
|
||
// Act | ||
pair.logged() | ||
|
||
// Assert | ||
assertTestLogger(Log.Level.Debug, "(Hello, World)", "Pair", null) | ||
} | ||
|
||
@Test | ||
fun logged_List() { | ||
// Arrange | ||
val list = listOf("Hello", "World") | ||
|
||
// Act | ||
list.logged() | ||
|
||
// Assert | ||
assertTestLogger(Log.Level.Debug, "[Hello, World]", expectedListTag, null) | ||
} | ||
|
||
@Test | ||
fun logged_Map() { | ||
// Arrange | ||
val map = mapOf("Hello" to "World") | ||
|
||
// Act | ||
map.logged() | ||
|
||
// Assert | ||
assertTestLogger(Log.Level.Debug, "{Hello=World}", expectedMapTag, null) | ||
} | ||
} |
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,16 @@ | ||
package testing | ||
|
||
import saschpe.log4k.Log | ||
import kotlin.test.AfterTest | ||
import kotlin.test.BeforeTest | ||
|
||
abstract class TestLoggerTest { | ||
@BeforeTest // Arrange | ||
fun before() { | ||
Log.loggers.clear() | ||
Log.loggers += TestLogger() | ||
} | ||
|
||
@AfterTest | ||
fun after() = Log.loggers.clear() | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
package saschpe.log4k | ||
|
||
internal actual val expectedListTag: String = "ArrayList" | ||
internal actual val expectedMapTag: String = "HashMap" |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
package saschpe.log4k | ||
|
||
internal actual val expectedListTag: String = "ArrayList" | ||
internal actual val expectedMapTag: String = "SingletonMap" |