8000 ✨ Kotlin sample source file with multiple classes · Issue #35 · kotools/samples · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
✨ Kotlin sample source file with multiple classes #35
Open
@LVMVRQUXL

Description

@LVMVRQUXL

📝 Description

Having a single class in sample files being a current limitation for Kotools Samples, we want to support Kotlin sample source files with multiple classes.

import kotlin.test.Test
import kotlin.test.assertEquals

class IntKotlinSample {
    @Test
    fun plus() { // Extracted in 'build/kotools-samples/extracted/IntKotlinSample/plus.md'.
        val x = 1
        val y = 2
        val result: Int = x + y
        assertEquals(3, result)
    }
}

class LongKotlinSample {
    @Test
    fun plus() { // Extracted in 'build/kotools-samples/extracted/LongKotlinSample/plus.md'.
        val x = 1L
        val y = 2L
        val result: Long = x + y
        assertEquals(3, result)
    }
}

By doing so, we don't need to check if sample source files contain a single class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0