Skip to content

Commit 629d7cb

Browse files
committed
fixed tests
1 parent 4c5a91c commit 629d7cb

File tree

6 files changed

+42
-10
lines changed

6 files changed

+42
-10
lines changed

.idea/modules/kotlin-unsigned.iml

Lines changed: 29 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'kotlin'
33

44
apply plugin: 'com.github.johnrengelman.shadow'
55

6-
ext.moduleName = 'com.github.kotlin_graphics.kotlin_unsigned'
6+
//ext.moduleName = 'com.github.kotlin_graphics.kotlin_unsigned'
77

88
buildscript {
99

@@ -55,10 +55,10 @@ artifacts {
5555
archives sourcesJar
5656
archives javadocJar
5757
}
58-
59-
jar {
60-
inputs.property("moduleName", moduleName)
61-
manifest {
62-
attributes('Automatic-Module-Name': moduleName)
63-
}
64-
}
58+
//
59+
//jar {
60+
// inputs.property("moduleName", moduleName)
61+
// manifest {
62+
// attributes('Automatic-Module-Name': moduleName)
63+
// }
64+
//}

src/main/kotlin/unsigned/Ubyte.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,6 @@ class Ubyte(var v: Byte) : Number() {
9696
operator fun compareTo(b: Int) = toInt() compareUnsigned b
9797

9898
override fun toString() = toInt().toString()
99+
100+
override fun equals(other: Any?) = other is Ubyte && v == other.v
99101
}

src/main/kotlin/unsigned/Uint.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,6 @@ data class Uint(var v: Int = 0) : Number() {
7979

8080
override fun toString() = toLong().toString()
8181

82+
override fun equals(other: Any?) = other is Uint && v == other.v
8283
// TODO long?
8384
}

src/main/kotlin/unsigned/Ulong.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ data class Ulong(var v: Long = 0) : Number(), Comparable<Ulong> {
7474
// TODO others
7575

7676
override fun toString() = toBigInt().toString()
77+
override fun equals(other: Any?) = other is Ulong && v == other.v
7778

7879
operator fun rangeTo(b: Ulong) = UlongRange(this, b)
7980

src/main/kotlin/unsigned/Ushort.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ data class Ushort(var v: Short = 0) : Number() {
9393
operator fun compareTo(b: Int) = toInt() compareUnsigned b
9494

9595
override fun toString() = toInt().toString()
96+
override fun equals(other: Any?) = other is Ushort && v == other.v
9697
}

0 commit comments

Comments
 (0)