77 Commits

Author SHA1 Message Date
Nikita Popov
ab19cb01fd Adjust serialization tests
I believe this is due to the support for unserializing with changed
visibility, which will assign to the private x/y properties now.
2019-04-08 09:24:02 +02:00
Nikita Popov
5156669279 Adjust for PHP 8 negative array key change 2019-04-08 09:21:58 +02:00
Nikita Popov
2f0881e798 Avoid static call to non-static method 2019-04-08 09:12:32 +02:00
Nikita Popov
231e64995d Case-insensitive constants are no longer supported 2019-04-08 09:10:24 +02:00
Nikita Popov
64dd279d28 Fix more undefined constant uses 2019-04-08 09:06:18 +02:00
Nikita Popov
5fc96c5dfd (unset) casts are no longer supported since PHP 8 2019-04-08 09:02:56 +02:00
Nikita Popov
dc2e8d9593 Fix constant uses in basic.phpt
These are no longer legal in PHP 8. This is supposed to be testing
dynamic function calls, for which we should be using the string and
not rely on the bareword fallback.
2019-04-08 08:59:24 +02:00
Nikita Popov
9d99cf029b Revert "Define encoding of PHP scripts"
This reverts commit f35bd70531.
2019-03-15 10:30:07 +01:00
agares
f35bd70531 Define encoding of PHP scripts
1. Remove references to unicode codepoints (as those were ambigouous
without a defined encoding) and replace them with byte values
2. Define the encoding of PHP scripts as ASCII, where bytes greater than
0x7F are allowed
2019-03-15 10:08:58 +01:00
Nikita Popov
313688242e Adjust constant warning message for PHP 7.3
The spec already correctly mentions that resources are allowed.
The warning was clarified in PHP 7.3.
2018-12-22 13:29:45 +01:00
zhujinxuan
197a397cf8 Add trialing comma description for constructs and functions
* Add trailing comma for
  - isset and unset
  - static and dynamic methods
  - functions and closure as functions
  - new statement
* Add or change the related tests to support the trialing comma
2018-12-22 13:27:47 +01:00
Peter Kokot
be010b4435 Sync final newlines
- Redundant final newlines trimmed into one
- Missing final newlines added where can be added

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character although not
mandatory.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
2018-10-01 20:21:21 +02:00
Peter Kokot
97bef5c032 Trim trailing whitespace 2018-09-21 02:44:25 +02:00
Tyson Andre
4094fe38ac Fix other typos in tests/ 2018-09-16 09:49:11 +02:00
Nikita Popov
b5ca441040 Continue on switch emits warning 2018-09-10 13:54:16 +02:00
Nikita Popov
ea03278e7e Case-insensitive constants are deprecated 2018-09-10 13:47:58 +02:00
Tyson Andre
8f78136eaa Fix typos in the unit tests (comments/messages)
Detected by https://github.com/client9/misspell
2018-09-10 13:40:26 +02:00
Christoph M. Becker
7d350634b4 Fix description on how to run the tests
As of commit 8af91fd41c all tests are
PHPTs, and make_phpt has been removed.  We adjust the docs accordingly.
2018-08-29 19:18:00 +02:00
Nikita Popov
befef5a037 Account for deprecation notice in (unset) test 2017-05-05 18:25:25 +02:00
Rowan Collins
40ac5c13bc Reflect changes for RFC: Deprecate and Remove Bareword (Unquoted) Strings
https://wiki.php.net/rfc/deprecate-bareword-strings
2017-03-29 00:28:22 +02:00
Pedro Magalhães
ebf06e157a Update tests to be compatible with master 2016-12-13 00:24:59 +01:00
Nikita Popov
98924ab560 Merge branch 'PHP-7.0' 2016-07-11 18:51:45 +02:00
Nikita Popov
8f029a6d99 Test fixes
* New __METHOD__ value for closures
* Missing pass-by-ref notice for object
2016-07-11 18:51:01 +02:00
Reeze Xia
2d5cc6f08c Add the accepted RFC: class constant visibility to spec
RFC: https://wiki.php.net/rfc/class_const_visibility
2016-07-11 18:43:44 +02:00
Andrea Faulds
a3ea4e992f Warn about invalid strings in arithmetic
Squashed commit of the following:

commit 4bc40d9178
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Mar 20 02:20:28 2016 +0000

    Update spec for invalid numeric strings

commit 2461e4f738
Author: Andrea Faulds <ajf@ajf.me>
Date:   Wed Feb 24 16:53:26 2016 +0000

    Updated tests for invalid numeric strings
2016-03-30 01:46:51 +01:00
Andrea Faulds
0b1a497a6c Allow specifying keys on list() elements
Squashed commit of the following:

commit c56f6e3a7b
Author: Andrea Faulds <ajf@ajf.me>
Date:   Wed Feb 24 13:49:17 2016 +0000

    Import Zend Engine tests for list()

commit 3afd58a6c6
Author: Andrea Faulds <ajf@ajf.me>
Date:   Wed Feb 24 13:49:05 2016 +0000

    Update specification for list() keys
2016-03-25 17:27:45 +00:00
Andrea Faulds
ad1a8bdba4 Void return type 2016-02-05 12:42:41 +00:00
Nikita Popov
930b6d2b82 Update bit shift examples and tests 2015-12-18 16:00:37 +01:00
Stanislav Malyshev
af2557ecd9 Merge commit '3d00d96383787468c668ab4cca11168ecf363312'
Conflicts:
	tests/arrays/arrays.phpt
	tests/classes/sleep_and_wakeup.phpt
	tests/expressions/assignment_operators/assignment.phpt
	tests/expressions/multiplicative_operators/multiplication_division_modulus.phpt
	tests/expressions/unary_operators/cast.phpt
2015-06-27 22:58:56 -07:00
Stanislav Malyshev
3d00d96383 Fix tests not to depend on unspecified results 2015-06-27 19:52:15 -07:00
Stanislav Malyshev
8649b1a309 Merge branch 'pull-request/123' 2015-06-06 13:14:10 -07:00
Andrea Faulds
8ea1362b6f Fix typo in Unicode escape test 2015-06-06 15:33:18 +01:00
Nikita Popov
33063d96e4 Update numeric string spec for PHP 7
* Clarify what whitespace is supported - this is not the same as
   the white-space production.
 * Clarify that a sign is supported (which is not the case for
   the normal int/float productions)
 * Clarify that we only support decimal digits or float literals
2015-03-25 12:33:05 +01:00
Nikita Popov
bb56152868 Fix variable syntax test for PHP 5.6 2015-02-25 20:47:34 +01:00
Nikita Popov
799d60bec8 Update list() spec for PHP 7 2015-02-25 18:50:17 +01:00
Nikita Popov
223caa3ecd Delete leftover file 2015-01-07 23:03:36 +01:00
Nikita Popov
3c27b25065 Merge remote-tracking branch 'ajf/split_assignment_operator_test' 2015-01-07 23:02:14 +01:00
Andrea Faulds
1ab8067954 Split assignment operator megatest into smaller tests, update for PHP7 2015-01-07 22:01:23 +00:00
Nikita Popov
3261ea2f3b Merge branch 'PHP-5.6'
Conflicts:
	tests/arrays/arrays.php
	tests/arrays/arrays.php.expectf
	tests/basic_concepts/memory_model_and_array_types.php
	tests/basic_concepts/memory_model_and_array_types.php.expect
	tests/basic_concepts/memory_model_and_handle_types.php
	tests/basic_concepts/memory_model_and_resources.php.expect
	tests/basic_concepts/storage_duration.php
	tests/classes/__gets_return_type.php.expect
	tests/classes/__php_incomplete_class.php
	tests/classes/__php_incomplete_class.php.expect
	tests/classes/classes.php.expect
	tests/classes/cloning.php.expectf
	tests/classes/constructors.php.expect
	tests/classes/dynamic_methods.php.expectf
	tests/classes/dynamic_properties.php
	tests/classes/dynamic_properties.php.expect
	tests/classes/dynamic_properties2.php.expectf
	tests/classes/dynamic_properties3.php
	tests/classes/dynamic_properties3.php.expectf
	tests/classes/invoke.php.expect
	tests/classes/invoking.php.expect
	tests/classes/overloading.php
	tests/classes/overloading.php.expect
	tests/classes/overloading_2.php.expectf
	tests/classes/overloading_methods.php.expectf
	tests/classes/overloading_properties.php
	tests/classes/overloading_properties.php.expect
	tests/classes/overloading_properties2.php.expectf
	tests/classes/point2_test1.php.expect
	tests/classes/property_initializer.php
	tests/classes/property_initializer.php.expect
	tests/classes/serializable.php
	tests/classes/serializable.php.expect
	tests/classes/setting_state.php
	tests/classes/sleep_and_wakeup.php
	tests/classes/vehicle_test1.php.expect
	tests/constants/classes.php
	tests/constants/classes.php.expect
	tests/constants/constants.php
	tests/constants/constants.php.expectf
	tests/exception_handling/exception_class_experiment_1.php
	tests/exception_handling/hierarchy_of_exception_classes.php.expect
	tests/exception_handling/jump_from_catch_or_finally_clause.php
	tests/exception_handling/jump_from_catch_or_finally_clause.php.expect
	tests/exception_handling/odds_and_ends.php.expect
	tests/expressions/additive_operators/addition_subtraction_concatenation.php.expect
	tests/expressions/additive_operators/array_concatenation.php
	tests/expressions/additive_operators/array_concatenation.php.expectf
	tests/expressions/assignment_operators/assignment.php.expect
	tests/expressions/binary_logical_operators/binary_logical_operators.php.expect
	tests/expressions/bitwise_and,_or,_xor_operators/bitwise_and_or_xor.php.expect
	tests/expressions/bitwise_shift_operators/bitwise_shift.php
	tests/expressions/bitwise_shift_operators/bitwise_shift.php.expect
	tests/expressions/equality_operators/comparisons.php.expectf
	tests/expressions/error_control_operator/error_control.php.expectf
	tests/expressions/general/associativity.php.expect
	tests/expressions/general/order_of_evaluation.php.expect
	tests/expressions/general/precedence.php.expect
	tests/expressions/general/sequence_points.php.expect
	tests/expressions/instanceof_operator/instanceof.php
	tests/expressions/instanceof_operator/instanceof.php.expect
	tests/expressions/multiplicative_operators/multiplication_division_modulus.php.expectf
	tests/expressions/postfix_operators/exponentiation.php.expect
	tests/expressions/postfix_operators/member_selection_operator.php
	tests/expressions/postfix_operators/post-increment_and_decrement_integer_edge_cases.php.expect
	tests/expressions/postfix_operators/scope_resolution_operator.php.expect
	tests/expressions/postfix_operators/subscripting.php
	tests/expressions/primary_expressions/intrinsics_echo.php.expect
	tests/expressions/primary_expressions/intrinsics_eval.php.expect
	tests/expressions/primary_expressions/intrinsics_exit.php.expect
	tests/expressions/primary_expressions/intrinsics_print.php.expect
	tests/expressions/primary_expressions/primary.php.expect
	tests/expressions/relational_operators/comparisons1.php.expectf
	tests/expressions/relational_operators/comparisons2.php.expectf
	tests/expressions/relational_operators/comparisons3.php.expectf
	tests/expressions/relational_operators/comparisons4.php.expectf
	tests/expressions/relational_operators/comparisons5.php.expectf
	tests/expressions/source_file_inclusion/include.php
	tests/expressions/source_file_inclusion/require.php
	tests/expressions/unary_operators/cast.php
	tests/expressions/unary_operators/cast.php.expectf
	tests/expressions/unary_operators/pre-increment_and_decrement_integer_edge_cases.php.expect
	tests/expressions/unary_operators/unary_arithmetic_operators.php.expect
	tests/functions/anonymous_functions.php
	tests/functions/basics.php
	tests/functions/byrefs.php.expectf
	tests/functions/byrefs_in_array_elements.php.expect
	tests/functions/conditionally_defined_function.php
	tests/functions/conditionally_defined_function.php.expect
	tests/functions/order_of_evaluation.php
	tests/functions/order_of_evaluation.php.expectf
	tests/functions/passing_arguments.php
	tests/functions/recursion.php.expect
	tests/functions/type_hints.php.expect
	tests/functions/variable_functions.php.expect
	tests/interfaces/interfaces.php.expect
	tests/interfaces/vector.php.expect
	tests/lexical_structure/comments.php.expect
	tests/lexical_structure/keywords.php.expect
	tests/lexical_structure/tokens/array_literals.php
	tests/lexical_structure/tokens/array_literals.php.expect
	tests/lexical_structure/tokens/integer_literals_edge_cases.php.expect
	tests/lexical_structure/tokens/point.php
	tests/lexical_structure/tokens/point2.php
	tests/namespaces/name_lookup.php.expect
	tests/namespaces/namespaces1.php
	tests/namespaces/namespaces1.php.expect
	tests/namespaces/namespaces2.php.expect
	tests/namespaces/using_namespaces_2.php
	tests/namespaces/using_namespaces_3.php.expect
	tests/phpt/expressions/source_file_inclusion/limits.inc
	tests/phpt/expressions/source_file_inclusion/mycolors.inc
	tests/scope/scope.php.expect
	tests/statements/expression_statement.php.expect
	tests/statements/iteration/do.php.expect
	tests/statements/iteration/for.php.expect
	tests/statements/jump/break.php.expect
	tests/statements/jump/continue.php.expect
	tests/statements/jump/goto.php.expect
	tests/statements/selection/if.php.expectf
	tests/statements/selection/switch.php
	tests/statements/selection/switch.php.expect
	tests/traits/traits.php
	tests/types/resource/resources.php.expect
	tests/variables/unsetting_variables.php.expectf
	tests/variables/variable_kinds.php
	tests/variables/variable_kinds.php.expect
	tests/variables/variable_variables.php
	tests/variables/variable_variables.php.expectf
2015-01-07 22:49:46 +01:00
Nikita Popov
8af91fd41c Make phpt tests canonical 2015-01-07 22:42:29 +01:00
Nikita Popov
015dd0ad44 Merge branch 'PHP-5.6'
Conflicts:
	tests/phpt/phpt/expressions/source_file_inclusion/limits.inc
	tests/phpt/phpt/expressions/source_file_inclusion/mycolors.inc
2015-01-04 21:57:52 +01:00
Nikita Popov
a02d1f2613 Fix make_phpt script to not create phpt/phpt/ dir 2015-01-04 21:54:33 +01:00
Nikita Popov
121c3cdfe7 Merge branch 'PHP-5.6' 2015-01-04 21:00:44 +01:00
Nikita Popov
483cf11341 Update PHPT tests 2015-01-04 20:59:04 +01:00
Nikita Popov
865dd83685 Merge branch 'PHP-5.6' 2015-01-04 19:07:21 +01:00
Nikita Popov
3ececa7870 Don't depend on particular object handles 2015-01-04 19:06:59 +01:00
Nikita Popov
8154363f5b Merge branch 'PHP-5.6' 2015-01-04 18:57:25 +01:00
Nikita Popov
5a89ab311c Fix exception_class_experiment_1
Output was not adjusted after the file was renamed.
2015-01-04 18:56:31 +01:00
Nikita Popov
5711871a9e Merge branch 'PHP-5.6'
Conflicts:
	tests/expressions/source_file_inclusion/limits.php.expectf
	tests/expressions/source_file_inclusion/mycolors.php.expectf
	tests/expressions/source_file_inclusion/require.php.expectf
	tests/expressions/source_file_inclusion/test.php.expectf
2015-01-04 18:51:26 +01:00
Nikita Popov
1f63ca4acc Convert some .php files to .inc files
These are just helpers for the include/require tests, not tests by
themselves.

Using the .inc name they'll be copied when ./make_phpt is called.
2015-01-04 18:48:55 +01:00