Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for configurationCacheRoundtripOf (0.31 sec)

  1. platforms/core-configuration/configuration-cache/src/test/kotlin/org/gradle/internal/cc/impl/serialization/codecs/UserTypesCodecTest.kt

    
    class UserTypesCodecTest : AbstractUserTypeCodecTest() {
    
        @Test
        fun `can handle deeply nested graphs`() {
    
            val deepGraph = Peano.fromInt(1024)
    
            val read = configurationCacheRoundtripOf(deepGraph)
    
            assertThat(
                read.toInt(),
                equalTo(deepGraph.toInt())
            )
        }
    
        @Test
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. platforms/core-configuration/configuration-cache/src/test/kotlin/org/gradle/internal/cc/impl/serialization/codecs/BaseTypeCodecTest.kt

        @Test
        fun `can handle Properties`() {
            val properties = Properties()
            properties.setProperty("prop1", "value1")
            properties.setProperty("prop2", "value2")
            configurationCacheRoundtripOf(properties).run {
                assertThat(properties, equalTo(this))
            }
        }
    
        @Test
        fun `can handle Hashtable`() {
            val hashtable = Hashtable<String, Any>(100)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  3. platforms/core-configuration/configuration-cache/src/test/kotlin/org/gradle/internal/cc/impl/serialization/codecs/AbstractFunctionalTypeTest.kt

            Runtime.value = "before"
            val value = configurationCacheRoundtripOf(deferred)
    
            Runtime.value = "after"
            assertThat(
                force(value),
                equalTo("after")
            )
        }
    
        protected
        fun <T : Any> assertEagerEvaluationOf(eager: T, extract: T.() -> Any?) {
            Runtime.value = "before"
            val value = configurationCacheRoundtripOf(eager)
    
            Runtime.value = "after"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  4. platforms/core-configuration/configuration-cache/src/test/kotlin/org/gradle/internal/cc/impl/serialization/codecs/UnitCodecTest.kt

    
    class UnitCodecTest : AbstractUserTypeCodecTest() {
    
        @Test
        @Issue("https://github.com/gradle/gradle/issues/25560")
        fun `same Unit instance is used upon restore`() {
            configurationCacheRoundtripOf(Unit).run {
                assertThat(this, sameInstance(Unit))
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  5. platforms/core-configuration/configuration-cache/src/test/kotlin/org/gradle/internal/cc/impl/serialization/codecs/AbstractUserTypeCodecTest.kt

                            problems += problem
                        }
                    }
                )
            }
    
        protected
        fun <T : Any> configurationCacheRoundtripOf(graph: T, codec: Codec<Any?> = userTypesCodec()): T =
            writeToByteArray(graph, codec)
                .let { readFromByteArray(it, codec)!! }
                .uncheckedCast()
    
        internal
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:30 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  6. platforms/core-configuration/configuration-cache/src/test/kotlin/org/gradle/internal/cc/impl/serialization/codecs/JavaObjectSerializationCodecTest.kt

        private
        fun <T : Any> verifyRoundtripOf(factory: () -> T, verify: (T) -> Unit) {
            verify(javaSerializationRoundtripOf(factory()))
            verify(configurationCacheRoundtripOf(factory()))
        }
    
        private
        fun <T : Any> javaSerializationRoundtripOf(bean: T): T =
            javaDeserialize(javaSerialize(bean)).uncheckedCast()
    
        private
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 16.1K bytes
    - Viewed (0)
Back to top