Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 93 for parse (0.14 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/WebSocketExtensionsTest.kt

    class WebSocketExtensionsTest {
      @Test
      fun emptyHeader() {
        assertThat(parse("")).isEqualTo(WebSocketExtensions())
      }
    
      @Test
      fun noExtensionHeader() {
        assertThat(WebSocketExtensions.parse(headersOf()))
          .isEqualTo(WebSocketExtensions())
      }
    
      @Test
      fun emptyExtension() {
        assertThat(parse(", permessage-deflate"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http/StatusLineTest.kt

    import kotlin.test.assertFailsWith
    import okhttp3.Protocol
    import okhttp3.internal.http.StatusLine.Companion.parse
    import org.junit.jupiter.api.Test
    
    class StatusLineTest {
      @Test
      fun parse() {
        val message = "Temporary Redirect"
        val version = 1
        val code = 200
        val statusLine = parse("HTTP/1.$version $code $message")
        assertThat(statusLine.message).isEqualTo(message)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  3. build-logic-commons/module-identity/src/main/kotlin/gradlebuild/identity/extension/ReleasedVersionsDetails.kt

            allTestedVersions = testedVersions.map { VersionNumber.parse(it.gradleVersion().version) }
                .groupBy { "${it.major}.${it.minor}" }
                .map { (_, v) -> v.maxOrNull()!!.format() }
    
            // Limit to first and last release of each major version
            mainTestedVersions = testedVersions.map { VersionNumber.parse(it.gradleVersion().version) }
                .groupBy { it.major }
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Sat Sep 30 16:17:28 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/MediaTypeTest.kt

        val mediaType = parse("text/plain;a=\";charset=utf-8;b=\"")
        assertNull(mediaType.charsetName())
      }
    
      @Test fun testSingleQuotesAreNotSpecial() {
        val mediaType = parse("text/plain;a=';charset=utf-8;b='")
        assertEquals("UTF-8", mediaType.charsetName())
      }
    
      @Test fun testParseWithSpecialCharacters() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  5. WORKSPACE

    python_register_toolchains(
        name = "python",
        ignore_root_user_error = True,
        python_version = TF_PYTHON_VERSION,
    )
    
    load("@python//:defs.bzl", "interpreter")
    load("@rules_python//python:pip.bzl", "package_annotation", "pip_parse")
    
    NUMPY_ANNOTATIONS = {
        "numpy": package_annotation(
            additive_build_content = """\
    filegroup(
        name = "includes",
        srcs = glob(["site-packages/numpy/core/include/**/*.h"]),
    )
    cc_library(
    Plain Text
    - Registered: Tue May 07 12:40:20 GMT 2024
    - Last Modified: Fri Apr 05 22:27:48 GMT 2024
    - 3K bytes
    - Viewed (2)
  6. okhttp/src/test/java/okhttp3/MediaTypeGetTest.kt

    import okhttp3.MediaType.Companion.toMediaType
    
    open class MediaTypeGetTest : MediaTypeTest() {
      override fun parse(string: String): MediaType = string.toMediaType()
    
      override fun assertInvalid(
        string: String,
        exceptionMessage: String?,
      ) {
        val e =
          assertFailsWith<IllegalArgumentException> {
            parse(string)
          }
        assertEquals(exceptionMessage, e.message)
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/MediaTypeJvmTest.kt

      @Test fun testIllegalCharsetName() {
        val mediaType = parse("text/plain; charset=\"!@#$%^&*()\"")
        assertNull(mediaType.charsetName())
      }
    
      @Test fun testUnsupportedCharset() {
        val mediaType = parse("text/plain; charset=utf-wtf")
        assertNull(mediaType.charsetName())
      }
    
      @Test fun testCharsetNameIsDoubleQuotedAndSingleQuoted() {
        val mediaType = parse("text/plain;charset=\"'utf-8'\"")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CacheControlJvmTest.kt

        assertThat(cacheControl.mustRevalidate).isFalse()
      }
    
      @Test
      @Throws(Exception::class)
      fun parse() {
        val header = (
          "no-cache, no-store, max-age=1, s-maxage=2, private, public, must-revalidate, " +
            "max-stale=3, min-fresh=4, only-if-cached, no-transform"
        )
        val cacheControl =
          parse(
            Headers.Builder()
              .set("Cache-Control", header)
              .build(),
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http/DateFormatting.kt

      arrayOfNulls<DateFormat>(BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS.size)
    
    /** Returns the date for this string, or null if the value couldn't be parsed. */
    fun String.toHttpDateOrNull(): Date? {
      if (isEmpty()) return null
    
      val position = ParsePosition(0)
      var result = STANDARD_DATE_FORMAT.get().parse(this, position)
      if (position.index == length) {
        // STANDARD_DATE_FORMAT must match exactly; all text must be consumed, e.g. no ignored
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  10. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/Story.kt

     * limitations under the License.
     */
    package okhttp3.internal.http2.hpackjson
    
    /**
     * Representation of one story, a set of request headers to encode or decode. This class is used
     * reflectively with Moshi to parse stories from files.
     */
    data class Story(
      val description: String? = null,
      val cases: List<Case>,
      val fileName: String? = null,
    ) {
      // Used as the test name.
      override fun toString() = fileName ?: "?"
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (0)
Back to top