Skip to content

Commit 4ed9764

Browse files
vassilmladenovfacebook-github-bot
authored andcommitted
nameof tests for xhp and namespaces
Reviewed By: patriciamckenzie Differential Revision: D58684937 fbshipit-source-id: 8b5f183646a26156a9c5f53fbb1233b5fab3f604
1 parent b888928 commit 4ed9764

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

hphp/test/slow/nameof/ns.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?hh
2+
3+
namespace B {
4+
<<__EntryPoint>>
5+
function main(): void {
6+
\var_dump(C::class);
7+
\var_dump(nameof C);
8+
\var_dump(\C::class);
9+
\var_dump(nameof \C);
10+
\var_dump(A\C::class);
11+
\var_dump(nameof A\C);
12+
\var_dump(\A\C::class);
13+
\var_dump(nameof \A\C);
14+
}
15+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
string(3) "B\C"
2+
string(3) "B\C"
3+
string(1) "C"
4+
string(1) "C"
5+
string(5) "B\A\C"
6+
string(5) "B\A\C"
7+
string(3) "A\C"
8+
string(3) "A\C"

hphp/test/slow/nameof/xhp.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?hh
2+
3+
class :xhp:foo {}
4+
5+
<<__EntryPoint>>
6+
function main(): void {
7+
var_dump(:xhp:foo::class);
8+
var_dump(nameof :xhp:foo);
9+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
string(12) "xhp_xhp__foo"
2+
string(12) "xhp_xhp__foo"

0 commit comments

Comments
 (0)