CodeSampleX

네트워크가 찾아낸 것

아래 각 줄은 의견이 아니라 측정입니다. 모두 공개된 샘플로 연결되며, 그 샘플의 contract는 네트워크를 끈 고정 컨테이너에서 실행되므로 직접 다시 돌려 보고 반박할 수 있습니다.

운영체제와 런타임은 연결된 샘플에 실제 기록된 환경을 기준으로 합니다. 해당 값이 없는 항목은 필터 선택 시 제외됩니다.

597개 발견, 8개 생태계.

샘플이 말하고, 계약이 측정한 것

발행된 샘플이 측정한 결과 중 526–550번째입니다(전체 568개).

  1. composer샘플 컨트랙트php · linux/x64symfony/console@v8.1.4

    믿는 것QuestionHelper applies configured Question normalizers to default values in non-interactive execution before validating and returning the response.

    측정한 것QuestionHelper::ask() in non-interactive mode completely bypasses Question::setNormalizer(), returning the unnormalized default value and passing the unnormalized type directly to the validator.

  2. composer샘플 컨트랙트php · linux/x64symfony/console@7.4.16

    믿는 것A model expects that destroying StreamOutput closes its underlying stream resource, ConsoleOutput opens fresh stream handles per instance, OutputFormatter resets style tags between format calls, and ProgressBar writes output to STDOUT.

    측정한 것StreamOutput does not close its underlying stream resource when destroyed, leaving the file descriptor open unless explicitly closed with fclose by the caller

  3. composer샘플 컨트랙트php · linux/x64symfony/console@8.1.4

    믿는 것Serializing an ArrayInput instance to a CLI string with __toString() produces argument tokens that preserve boolean flag states and option values when round-tripped through StringInput.

    측정한 것ArrayInput::__toString() serializes a boolean true flag as '--flag=1', which throws RuntimeException when rebound to a VALUE_NONE option, and serializes a boolean false flag as '--flag', which inverts the flag to true when reparsed.

  4. composer샘플 컨트랙트php · linux/x64symfony/console@7.2.1

    믿는 것Declaring a protected static $defaultName property on a Command subclass sets the command name and description and allows registering it with Application::add().

    측정한 것In Symfony Console 7, Command::getDefaultName() returns null for classes defining static $defaultName, leaving the command name null and causing Application::add() to throw LogicException unless configured via the #[AsCommand] attribute.

  5. golang샘플 컨트랙트go · linux/x64sigs.k8s.io/yaml@v1.6.0

    믿는 것Unmarshaling YAML with type mismatches returns a yaml.TypeError, non-pointer destinations return an InvalidUnmarshalError, and UnmarshalStrict returns uniform YAML unmarshal errors for all schema violations.

    측정한 것Type mismatch in YAML unmarshaling returns a wrapped *json.UnmarshalTypeError with prefix 'error unmarshaling JSON' and does not match yaml.TypeError

  6. hex샘플 컨트랙트elixir · linux/x64nimble_options@1.1.1

    믿는 것A custom type callback is expected to return an error tuple and still be reported as {:error, ValidationError}; anything else should do the same.

    측정한 것assert NimbleOptions.validate([port: :bad], custom_schema()) converts {:error, message} from the callback into a NimbleOptions.ValidationError whose message is prefixed with the library error field

  7. hex샘플 컨트랙트elixir · linux/x64decimal@3.1.1

    믿는 것Decimal.new/1 and Decimal.parse/1 parse any decimal string containing up to the default decimal128 context precision of 34 significant digits regardless of leading zeros.

    측정한 것assert Decimal.new parses 34 significant digits with leading zero without exceeding max_digits

  8. golang샘플 컨트랙트go · linux/x64github.com/go-chi/chi/v5@v5.3.1

    믿는 것Calling ClientIPFromXFF with no arguments extracts the originating client IP from the leftmost entry in X-Forwarded-For and updates RemoteAddr like RealIP.

    측정한 것assert ClientIPFromXFF with unset trusted prefixes returns the rightmost XFF hop rather than the leftmost client IP

  9. golang샘플 컨트랙트go · linux/x64github.com/go-chi/chi/v5@v5.3.1

    믿는 것Registering middleware.URLFormat and middleware.StripSlashes in either order yields the same route match behavior for /item.json/.

    측정한 것When middleware.URLFormat is registered before middleware.StripSlashes and only GET /item exists, GET /item.json/ returns 404.

  10. golang샘플 컨트랙트go · linux/x64sigs.k8s.io/yaml@v1.4.0

    믿는 것sigs.k8s.io/yaml.Unmarshal preserves exact 64-bit integer values when decoding YAML into untyped maps or interface{} fields without explicit decoder options.

    측정한 것assert default Unmarshal silently truncates integers above 2^53 into float64 whereas JSONOpt UseNumber preserves exact int64 values as json.Number

  11. golang샘플 컨트랙트go · linux/x64encoding/json@v1.26.5

    믿는 것A JSON encoder serializes string values using standard RFC 8259 character escaping, preserving literal <, >, and & characters unless HTML escaping is explicitly enabled.

    측정한 것assert json.NewEncoder with default settings escapes <, >, and & into \u003c, \u003e, and \u0026

  12. golang샘플 컨트랙트go · linux/x64sigs.k8s.io/yaml@v1.4.0

    믿는 것A caller expects unknown YAML keys to be rejected by default when decoding into a typed struct.

    측정한 것assert Unmarshal succeeds when decoding `name: main unknown: value` into `decodeTarget` without options

  13. golang샘플 컨트랙트go · linux/x64encoding/json@go1.26.5

    믿는 것Using Decoder.UseNumber causes every decoded number to be produced as json.Number, even when decoding into a concrete numeric struct field.

    측정한 것assert that decoding `{"count": 7, "wildcard": 7}` with Decoder.UseNumber into struct `{Count int; Wildcard any}` yields `Count` as an `int` and `Wildcard` as `json.Number`

  14. golang샘플 컨트랙트go · linux/x64net/http@go1.26.5

    믿는 것A caller using a default http.Client should see the same payload bytes and encoding metadata that the server put on the response.

    측정한 것When a server writes a gzip-compressed body, a default http.Client request must return plain text bytes, not gzip bytes.

  15. golang샘플 컨트랙트go · linux/x64net/http@go1.26.5

    믿는 것A POST request that receives a 303 See Other keeps its method and body through automatic redirect following.

    측정한 것A default client must follow `StatusSeeOther` (`303`) by issuing the next request as `GET`, not as the original method.

  16. golang샘플 컨트랙트go · linux/x64net/http@go1.26.5

    믿는 것A method token in a ServeMux pattern, such as `GET /resource`, is just part of the path and does not affect routing.

    측정한 것Registering `HandleFunc("GET /resource", ...)` and `HandleFunc("POST /resource", ...)` must allow GET and POST only, while a PUT request to `/resource` must fail with 405.

  17. golang샘플 컨트랙트go · linux/x64encoding/json@v1.26.5

    믿는 것json.Marshal encodes fixed-size byte arrays [N]byte as Base64 strings and json.Unmarshal decodes Base64 strings into byte arrays.

    측정한 것assert json.Marshal encodes fixed-size byte array [N]byte as a JSON numeric array instead of a base64 string

  18. golang샘플 컨트랙트go · linux/x64encoding/json@go1.26.5

    믿는 것A field is omitted only when its value is reflect-empty, so a non-empty struct value must always be serialized unless `omitempty` is false.

    측정한 것assert json.Marshal with tag `field,omitzero` omits a non-empty struct when its IsZero() method returns true

  19. golang샘플 컨트랙트go · linux/x64encoding/json@v1.26.5

    믿는 것A caller can treat json.Encoder.Encode as json.Marshal followed by Write, so the output bytes are exactly the JSON value.

    측정한 것assert that json.NewEncoder(&buf).Encode(v) appends a trailing \n byte to the encoded output

  20. pypi샘플 컨트랙트python · linux/x64httpx2@2.10.0

    믿는 것Passing query parameters via the params argument merges them with query parameters already present in the target URL.

    측정한 것assert passing params to Request('GET', 'https://example.com/search?q=python', params={'page': '2'}) overwrites the URL query to 'page=2', discarding 'q=python'

  21. composer샘플 컨트랙트php · linux/x64symfony/console@7.4.16

    믿는 것A competent developer or model expects that during the execution of a parent command, the Application's active running command context is preserved across sub-command invocations, ensuring that error rendering retains the parent command's synopsis throughout its lifecycle.

    측정한 것Application doRun resets runningCommand to null upon sub-command completion instead of restoring the parent command

  22. composer샘플 컨트랙트php · linux/x64guzzlehttp/guzzle@8.0.2

    믿는 것Passing a stream or resource sink to a request that follows redirects writes only the final destination response body into the sink.

    측정한 것assert a stream sink passed during redirected requests accumulates both intermediate redirect bodies and final response body instead of only the destination body

  23. npm샘플 컨트랙트node · linux/x64vitest@4.1.10

    믿는 것mockReset clears call records and replaces the mock implementation with an empty function returning undefined like Jest, rather than reverting to the initial implementation while keeping the spy active

    측정한 것assert mockReset on vi.spyOn reverts to initial method implementation instead of undefined while continuing to intercept and record calls

  24. cargo샘플 컨트랙트rust · linux/x64winnow@1.0.4

    믿는 것When an alt combinator fails on invalid input after partially matching an alternative, ContextError preserves the error details and byte offset from whichever branch parsed deepest.

    측정한 것assert alt with ContextError discards a partial match in an earlier branch and returns the error and offset of the last evaluated branch, while cut_err prevents backtrack and preserves the deep failure site

  25. composer샘플 컨트랙트php · linux/x64symfony/console@8.1.4

    믿는 것Unrecognized CLI options throw InvalidOptionException and missing required arguments throw MissingInputException.

    측정한 것ArgvInput with an unknown option throws RuntimeException rather than InvalidOptionException or InvalidArgumentException

여기 있는 줄을 확인하는 방법

샘플을 열고 contract를 읽고 실행하십시오. contract는 그 샘플 자신의 테스트입니다. 네트워크를 끈 고정 컨테이너에서 실행되고, 그 실행의 서명된 영수증이 네트워크에 저장됩니다. 여기 있는 어떤 것도 라이브러리에 대한 우리의 해석에 기대지 않습니다. 라이브러리가 실제로 한 일에만 기댑니다.

게시된 샘플 중 일부는 이 페이지에 없습니다. 계약은 통과했고 샘플도 살아 있지만, 그 계약에 문장으로 읽힐 줄이 없기 때문입니다. expect(x).toBe(1) 같은 단언은 그것이 검사하는 믿음 옆에 놓아도 독자에게 아무것도 말해주지 않습니다. 읽을 수 없는 근거를 싣기보다는 뺀다는 쪽을 택했습니다.