Verified Commit ad8b59b0 authored by AtjonTV's avatar AtjonTV

Lint: Apply formating (Gradle FormatKotlin)

parent 5d9f7cf7
fun main() {
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ fun main() {
val bill = AustrianBill.parseString("_R1-AT0_0007759_0007759003000202001097592_2020-01-09T17:09:32_3,78_1,99_0,00_0,00_0,00_aGe0roWrPMk=_U:ATU59193205-001_z8qkXAkDVyo=_NTFazirbPJifH6BGKgeJnEQwUWenNQw+E2Am+brnBT1QIKGa3CZyOwVohhszQ0XqfSMtZOCsds5S3s53+xb8+g==")
println(bill)
}
\ No newline at end of file
}
......@@ -19,11 +19,11 @@ fun main() {
println(" Kotlin time: $kotlinTotalTime ms")
println(" kLib time: $kLibTotalTime ms")
println("------------------------------------------")
println(" kLib saves ${kotlinTotalTime-kLibTotalTime} ms")
println(" kLib saves ${kotlinTotalTime - kLibTotalTime} ms")
}
fun binSearchList(find: Int) {
val sortedInput = listOf("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
val sortedInput = listOf("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")
println(" Running with ${sortedInput.size} Items")
val searchValue = sortedInput[find]
......@@ -58,4 +58,4 @@ fun binSearchArray(find: Int) {
}
kotlinTotalTime += kotlin
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ fun main() {
{
println("hi")
} every 10_000
}
\ No newline at end of file
}
......@@ -43,4 +43,4 @@ fun main() {
it.id *= 5
println(it)
}
}
\ No newline at end of file
}
......@@ -11,8 +11,8 @@ fun useWhileLoop() {
val socket = KSocket()
socket.open("/tmp/kotlin-socket.sk")
while(socket.canRead) {
if(socket.read() >= 1) {
while (socket.canRead) {
if (socket.read() >= 1) {
println(socket.data)
}
......@@ -25,8 +25,8 @@ fun useTimedLoop() {
socket.open("/tmp/kotlin-socket2.sk")
socket.readTimed { size, data ->
if(size >= 1) {
if (size >= 1) {
println(data)
}
}
}
\ No newline at end of file
}
......@@ -7,9 +7,9 @@ fun main() {
line("Counter")
line("This will count to 100:")
for(i in 0 .. 100) {
for (i in 0..100) {
+ "$i,"
}
}
println(string)
}
\ No newline at end of file
}
......@@ -11,7 +11,7 @@ fun main() {
println(Konfig.parseString(testKonfig))
if((Konfig.parseString(testKonfig)["help"] as Boolean)) {
if ((Konfig.parseString(testKonfig)["help"] as Boolean)) {
println("Help was True")
}
}
\ No newline at end of file
}
......@@ -24,4 +24,4 @@ fun main() {
}
hello("hi")
}
\ No newline at end of file
}
......@@ -13,8 +13,8 @@ fun main() {
fun mergeArrays() {
val listA = mutableMapOf("a" to "b")
val arrayA = arrayOf("c","e","g")
val arrayB = arrayOf("d","f","h")
val arrayA = arrayOf("c", "e", "g")
val arrayB = arrayOf("d", "f", "h")
listA.mergeArrays(arrayA, arrayB)
println(listA)
......@@ -63,4 +63,4 @@ fun smartMerge2() {
listA.smartMerge(listB) { it as String }
println(listA)
}
\ No newline at end of file
}
......@@ -3,7 +3,7 @@ package devtests
import klib.extensions.binSearch
fun main() {
val list = mutableListOf(1,4,7,9,11,66,99)
val list = mutableListOf(1, 4, 7, 9, 11, 66, 99)
println(list.binSearch(7))
}
\ No newline at end of file
}
......@@ -3,8 +3,8 @@ package devtests
import klib.extensions.toListWithConvert
fun main() {
val listA = mutableListOf("1","3","8")
val listA = mutableListOf("1", "3", "8")
val listB = listA.toListWithConvert { it.toIntOrNull() ?: 0 }
println(listB)
}
\ No newline at end of file
}
......@@ -7,5 +7,5 @@ fun main() {
val test: String? = null
println(test or "not null")
println(test orNullable null)
}
\ No newline at end of file
println(test orNullable null)
}
......@@ -3,9 +3,9 @@ package devtests
import klib.functions.runRandom
fun main() {
for(i in 0 until 100) {
for (i in 0 until 100) {
runRandom {
println("Hey, $i worked!")
}
}
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ fun main() {
val semver3 = SemVer.parse("1.0.0-beta+4")
println(semver3)
}
\ No newline at end of file
}
......@@ -15,4 +15,4 @@ fun main() {
println("1000z!9273".toLongOrNull() ?: 2)
println("1000z!9273" asLongOr 2L)
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ fun main() {
println("Normal: $normal")
println("Snake: $snakeCased")
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ import klib.uuid.UniqueID
fun main() {
UniqueID.random deny ""
}
\ No newline at end of file
}
package devtests
import klib.functions.using
import java.io.File
import klib.functions.using
fun main() {
using(File("").inputStream()) {
}
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ import klib.zip.ZipFile
fun main() {
val zipFile = ZipFile("/stmp/Documents.zip")
zipFile.unzip("/stmp".asFile())
}
\ No newline at end of file
}
package klib.extensions
import org.junit.Test
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import org.junit.Test
open class Animal(val name: String, val isAnimal: Boolean = true)
......@@ -10,7 +10,7 @@ class Dog(name: String, val isDog: Boolean = true) : Animal(name)
class TAny {
@Test
fun ofType(){
fun ofType() {
var success = false
val peter: Animal = Dog("Peter")
......@@ -41,4 +41,4 @@ class TAny {
true
} == true)
}
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ class TByte {
val byteResult = b(0x02) mul b(0x02)
assert(byteResult == b(0x04))
}
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ class TList {
val data2 = data.quicksort()
assert(data2 == listOf("Adam", "Clark", "John", "Peter", "Steve", "Tim", "Zack"))
}
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ class TMutableList {
data.quicksort()
assert(data == listOf("Adam", "Clark", "John", "Peter", "Steve", "Tim", "Zack"))
}
}
\ No newline at end of file
}
package klib.extensions
import org.junit.Test
import kotlin.test.assertFailsWith
import kotlin.test.assertTrue
import org.junit.Test
class TString {
@Test
fun deny(){
fun deny() {
assertFailsWith(klib.exceptions.InvalidValueException::class) {
"This is a very invalid test string containing a §" deny "§"
}
......@@ -18,7 +18,7 @@ class TString {
}
@Test
fun require(){
fun require() {
assertFailsWith(klib.exceptions.RequireValueException::class) {
"This is a very invalid test string containing no .." require "§"
}
......@@ -30,7 +30,7 @@ class TString {
}
@Test
fun asSha256(){
fun asSha256() {
assert("This is a test string for sha".asSha256() == "b1c5fff05aa05fcd7e0602215a3148b5d18ed0fdd46bbf02d7f6faaf70559b9d")
}
}
\ No newline at end of file
}
package klib.functions
import org.junit.Test
import kotlin.test.assertFalse
import org.junit.Test
class Failable {
@Test
fun requireOrFail() {
requireOrFail("Not NUll") {
assertFalse { true}
assertFalse { true }
}
requireOrFail(null) {
......@@ -25,4 +25,4 @@ class Failable {
assert(true)
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment