Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Commit

Permalink
support typed user attributes in open source
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #22

Reviewed By: kmeht

Differential Revision: D10449743

Pulled By: kmeht

fbshipit-source-id: 8b1ab4da123da7c093d9767e75379c5b63b67221
  • Loading branch information
fredemmott authored and facebook-github-bot committed Oct 18, 2018
1 parent bb8841d commit 444ee60
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions .hhconfig
Expand Up @@ -4,3 +4,4 @@ safe_array = true
safe_vector_array = true
unsafe_rx = false
ignored_paths = [ "vendor/.+/tests/.+" ]
user_attributes=
4 changes: 2 additions & 2 deletions tests/HSLUnreleasedGlobalsTest.php
Expand Up @@ -9,10 +9,10 @@
*/

use function Facebook\FBExpect\expect;
use type Facebook\HackTest\HackTest; // @oss-enable
use type Facebook\HackTest\{DataProvider, HackTest}; // @oss-enable
// @oss-disable: use type HackTestCase as HackTest;

<<Oncalls('hack')>>
// @oss-disable: <<Oncalls('hack')>>
final class HSLUnreleasedGlobalsTest extends HackTest {

public static function providesIsHackArray(): varray<mixed> {
Expand Down
2 changes: 1 addition & 1 deletion tests/grapheme/GraphemeIntrospectTest.php
Expand Up @@ -10,6 +10,7 @@

use namespace HH\Lib\Experimental\Str\Grapheme;
use function Facebook\FBExpect\expect;
use type Facebook\HackTest\DataProvider; // @oss-enable
// @oss-disable: use InvariantViolationException as InvariantException;

final class GraphemeIntrospectTest extends \Facebook\HackTest\HackTest {
Expand Down Expand Up @@ -102,4 +103,3 @@ public function testPositionExceptions(): void {
->toThrow(InvariantException::class);
}
}

2 changes: 1 addition & 1 deletion tests/grapheme/GraphemeSelectTest.php
Expand Up @@ -10,6 +10,7 @@

use namespace HH\Lib\Experimental\Str\Grapheme;
use function Facebook\FBExpect\expect;
use type Facebook\HackTest\DataProvider; // @oss-enable
// @oss-disable: use InvariantViolationException as InvariantException;

/**
Expand Down Expand Up @@ -74,4 +75,3 @@ public function testExtract(
expect(Grapheme\extract($string, $offset, $next))->toBeSame($expected);
}
}

4 changes: 2 additions & 2 deletions tests/io/PathTest.php
Expand Up @@ -12,11 +12,11 @@
use namespace HH\Lib\Experimental\IO;

use function Facebook\FBExpect\expect;
use type Facebook\HackTest\HackTest; // @oss-enable
use type Facebook\HackTest\{DataProvider, HackTest}; // @oss-enable
use type HH\InvariantException as InvalidRegexException; // @oss-enable
// @oss-disable: use type HackTestCase as HackTest;

<<Oncalls('hack')>>
// @oss-disable: <<Oncalls('hack')>>
final class PathTest extends HackTest {
public function testAbsolute(): void {
$relative_path = new IO\Path('foo/bar/baz');
Expand Down
2 changes: 1 addition & 1 deletion tests/random/PseudoRandomTest.php
Expand Up @@ -14,7 +14,7 @@
use type Facebook\HackTest\HackTest; // @oss-enable
// @oss-disable: use type HackTestCase as HackTest;

<<Oncalls('hack')>>
// @oss-disable: <<Oncalls('hack')>>
final class PseudoRandomTest extends HackTest {
use RandomTestTrait;

Expand Down
2 changes: 1 addition & 1 deletion tests/random/RandomTestTrait.php
Expand Up @@ -11,7 +11,7 @@
use namespace HH\Lib\{C, Dict, Math, Str, Vec, _Private};

use function Facebook\FBExpect\expect;
use type Facebook\HackTest\HackTest; // @oss-enable
use type Facebook\HackTest\{DataProvider, HackTest}; // @oss-enable
// @oss-disable: use type HackTestCase as HackTest;
// @oss-disable: use InvariantViolationException as InvariantException;

Expand Down
2 changes: 1 addition & 1 deletion tests/random/SecureRandomTest.php
Expand Up @@ -13,7 +13,7 @@
use type Facebook\HackTest\HackTest; // @oss-enable
// @oss-disable: use type HackTestCase as HackTest;

<<Oncalls('hack')>>
// @oss-disable: <<Oncalls('hack')>>
final class SecureRandomTest extends HackTest {
use RandomTestTrait;

Expand Down
4 changes: 2 additions & 2 deletions tests/regex/RegexTest.php
Expand Up @@ -12,11 +12,11 @@
use namespace HH\Lib\{C, Regex, Str, Vec};

use function Facebook\FBExpect\expect;
use type Facebook\HackTest\HackTest; // @oss-enable
use type Facebook\HackTest\{DataProvider, HackTest}; // @oss-enable
// @oss-disable: use type HackTestCase as HackTest;
use type HH\InvariantException as InvariantViolationException; // @oss-enable

<<Oncalls('hack')>>
// @oss-disable: <<Oncalls('hack')>>
final class RegexTest extends HackTest {

public static function checkThrowsOnInvalidRegex<T>(
Expand Down
2 changes: 1 addition & 1 deletion tests/utf8/Utf8IntrospectTest.php
Expand Up @@ -10,6 +10,7 @@

use namespace HH\Lib\Experimental\Str\Utf8;
use function Facebook\FBExpect\expect;
use type Facebook\HackTest\DataProvider; // @oss-enable
// @oss-disable: use InvariantViolationException as InvariantException;

final class Utf8IntrospectTest extends \Facebook\HackTest\HackTest {
Expand Down Expand Up @@ -137,4 +138,3 @@ public function testIsUtf8(string $string, bool $expected): void {
}

}

2 changes: 1 addition & 1 deletion tests/utf8/Utf8SelectTest.php
Expand Up @@ -9,6 +9,7 @@
*/

use namespace HH\Lib\Experimental\Str\Utf8;
use type Facebook\HackTest\DataProvider; // @oss-enable
use function Facebook\FBExpect\expect;
// @oss-disable: use InvariantViolationException as InvariantException;

Expand Down Expand Up @@ -72,4 +73,3 @@ public function testSliceBytes(
expect(Utf8\slice_bytes($string, $offset, $length))->toBeSame($expected);
}
}

2 changes: 1 addition & 1 deletion tests/utf8/Utf8TransformTest.php
Expand Up @@ -11,6 +11,7 @@
use namespace HH\Lib\Experimental\Str\Utf8;
use function Facebook\FBExpect\expect;
use type HH\Lib\Experimental\Str\Encoding;
use type Facebook\HackTest\DataProvider; // @oss-enable
// @oss-disable: use InvariantViolationException as InvariantException;

final class Utf8TransformTest extends \Facebook\HackTest\HackTest {
Expand Down Expand Up @@ -133,4 +134,3 @@ public function testToEncoding(
}

}

0 comments on commit 444ee60

Please sign in to comment.