Organize the unit tests for global_write_check
commit04853dad38449e1a8a140badfc7e7a06da2f5d69
authorChaoqiang Deng <chaoqiangdeng@fb.com>
Tue, 22 Feb 2022 18:19:24 +0000 (22 10:19 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 22 Feb 2022 18:24:02 +0000 (22 10:24 -0800)
tree75a224e59d50a21930989c41ea6d0d1e22d26c42
parenta14e1e03457024d59d1b297248859505024b6716
Organize the unit tests for global_write_check

Summary:
To replace the original single large test case, here we create several tiny unit test cases for primitives, collections, objects, memoized functions, anonymous functions and so on.
- Notice that the cases where our current analyzer does not handle well are marked by "To do" in the comments.

Reviewed By: jamesjwu

Differential Revision: D34180838

fbshipit-source-id: c9096e081d96fd0c8a762dcba0b4c692894e60ca
14 files changed:
hphp/hack/test/typecheck/global_write_check/test_anonymous.php [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_anonymous.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_basics.php [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_basics.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_collection.php [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_collection.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_control_flow.php [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_control_flow.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_memoized.php [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_memoized.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_object.php [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_object.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_primitive.php [new file with mode: 0644]
hphp/hack/test/typecheck/global_write_check/test_primitive.php.exp [new file with mode: 0644]