<commit_before>package com.natpryce.jsonk

import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import org.junit.runners.Parameterized.Parameters
import java.io.StringWriter
import javax.json.Json


@RunWith(Parameterized::class)
class JsonRoundTripTest(val exampleName: String) {
    companion object {
        @Parameters(name = "{0}") @JvmStatic
        fun examples() = ExampleJsonFiles.list()
    }
    
    @Test
    fun `round trips JSON`() {
        val roundTrippedViaJavaxJson = StringWriter().also { sw ->
            Json.createWriter(sw).write(
                Json.createReader(ExampleJsonFiles.open(exampleName)).use { r -> r.readValue() })
        }.toString()
        
        val roundTrippedViaJsonK = ExampleJsonFiles.load(exampleName).toJsonString()
        
        assertEquals(roundTrippedViaJavaxJson, roundTrippedViaJsonK)
    }
}<commit_msg>More test renaming<commit_after>package com.natpryce.jsonk

import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import org.junit.runners.Parameterized.Parameters
import java.io.StringWriter
import javax.json.Json


@RunWith(Parameterized::class)
class JsonRoundTripTest(val exampleName: String) {
    companion object {
        @Parameters(name = "{0}") @JvmStatic
        fun examples() = ExampleJsonFiles.list()
    }
    
    @Test
    fun round_trips_JSON() {
        val roundTrippedViaJavaxJson = StringWriter().also { sw ->
            Json.createWriter(sw).write(
                Json.createReader(ExampleJsonFiles.open(exampleName)).use { r -> r.readValue() })
        }.toString()
        
        val roundTrippedViaJsonK = ExampleJsonFiles.load(exampleName).toJsonString()
        
        assertEquals(roundTrippedViaJavaxJson, roundTrippedViaJsonK)
    }
}
{'fraction_non_alphanumeric': 0.10353935552033809, 'fraction_numerical': 0.0010565240359218173, 'mean_word_length': 3.334096109839817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2368226', 'n_tokens_mistral': 561, 'n_tokens_neox': 561, 'n_words': 96}