Skip to content

Skip tests rely on Zend MM turned on - #160

Merged
php-pulls merged 1 commit into
php:PHP-5.3from
reeze:skip-memory-exhaust-tests
Aug 14, 2012
Merged

php-pulls merged 1 commit into
php:PHP-5.3from
reeze:skip-memory-exhaust-tests

Conversation

@reeze

@reeze reeze commented Aug 13, 2012

Copy link
Copy Markdown
Contributor

Those two tests have expect memory exhausted fatal error.

These two tests will failed when in memory check mode in 32bit system.

Those two tests have expect memory exhausted fatal error
@travisbot

Copy link
Copy Markdown

This pull request fails (merged 0239437 into 4970926).

@reeze

reeze commented Aug 13, 2012

Copy link
Copy Markdown
Contributor Author

=.=
PHP's test always failed in Travis for now

@php-pulls
php-pulls merged commit 0239437 into php:PHP-5.3 Aug 14, 2012
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
…-methods

feat: List contains, indexOf and last, searching by section 19's ==
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
…s any does

Problem

- `loose.contains("vip")` on a `List<Any?>` was refused, while `loose.any(x => x == "vip")` compiled. The search
  check compared two elements of the element type, because it ran before the arguments were analyzed and the
  value's type was not known yet. Spec section 12 means `contains(value)` is `any(e => e == value)`, so the two
  must agree.
- `remove` takes the receiver-before-value rule from php#160's merge, and no test lowered a `remove` whose receiver
  runs code.

Solution

- `analyze_method_call` runs `check_element_equality` after `analyze_invocation_targets`, with the value's type.
  `check_element_equality` refuses what `element == value` refuses: `sharp_refusal` on the element type and the
  value's type, and `check_comparison_operand` for an `Any` element against the value's type.
- A value that is no element is refused by its argument check, so the search check runs only when the value's
  type is contained by the element type. It no longer reports a second issue on `sizes.contains("a")`.
- `display_refused_side` names the class part of either side, as `report_sharp_refusal` already did with its own
  closure, which it now calls.
- `a_list_search_runs_its_receiver_before_its_value` gains the row `this.bumped().items.remove(this.n)`.

crates/
  analyzer/
    src/expression/
      binary/comparison.rs   check_element_equality takes value_type; display_refused_side, shared with
                             report_sharp_refusal
      call/method_call.rs    runs the search check once the arguments are analyzed, for a value that fits
    tests/sharp.rs           a_search_needs_equality_on_the_element_type: contains and any agree on
                             List<Any?> given a string, given an Any?, and on List<Line> given a Line
  sharp-bridge/
    tests/lower.rs           a_list_search_runs_its_receiver_before_its_value: the remove row
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
Problem

patch-coverage failed a pull request on an impossible match arm, since no
test can run an unreachable!(…) call. #[coverage(off)] leaves out a whole
function, too much for one arm. So builders reshaped the code to pass: php#160
folded three impossible Refusal cases into a real arm behind debug_assert!,
and moved an unreachable! onto a line that runs. Agents copy what the tree
shows, so the workaround spreads.

Solution

As coverage.py's exclude_lines leaves out `raise NotImplementedError`, the
job drops the lcov records of every line that holds `unreachable!(` before
diff-cover reads them. cargo-llvm-cov has no line exclusion, so an awk step
filters lcov.info into reachable.info. It drops a line's DA record and its
FN record, since diff-cover scores a closure such as `|| unreachable!(…)`
from FN when the line has no DA. The failure message names both exclusions.

.github/workflows/ci.yml   <- patch-coverage: the awk step, diff-cover reads
                              reachable.info, the message names unreachable!(…)
heyJordanParker added a commit to heyJordanParker/php-sharp that referenced this pull request Oct 13, 2026
Problem: PR php#152 must be up to date with master, and master gained php#160, the
List and Map collection methods, after the last merge.

Solution: merge master. Git merged every file on its own. The analyzer,
semantics and bridge suites pass on the merged tree.

crates/
├── analyzer/src/expression/call/method_call.rs  both sides kept
├── analyzer/tests/sharp.rs                      both sides' tests kept
├── names/src/lib.rs                             master's change
└── sharp-bridge/
    ├── src/lower.rs                             both sides kept
    ├── src/lower/types.rs                       both sides kept
    └── tests/lower.rs                           both sides' tests kept
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants