Skip to content

Commit

Permalink
Run google java format on all Hermes java files
Browse files Browse the repository at this point in the history
Summary:
Format all Java files with Google Java Format.
There should be no behavior difference.

Reviewed By: zertosh

Differential Revision: D25027611

fbshipit-source-id: 0c857d089750820ed3e258b1b6307cae07c39253
  • Loading branch information
Riley Dulin authored and facebook-github-bot committed Nov 17, 2020
1 parent 77509f3 commit 2790082
Show file tree
Hide file tree
Showing 13 changed files with 223 additions and 244 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class HermesIntlAndroidTest extends InstrumentationTestCase {
public void testIntlFromAsset() throws IOException {
AssetManager assets = getInstrumentation().getContext().getAssets();
InputStream is = assets.open("intl.js");
String script = new BufferedReader(new InputStreamReader(is))
.lines().collect(Collectors.joining("\n"));
String script =
new BufferedReader(new InputStreamReader(is)).lines().collect(Collectors.joining("\n"));
try (JSRuntime rt = JSRuntime.makeHermesRuntime()) {
rt.evaluateJavaScript(script);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/




import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
Expand All @@ -29,12 +26,12 @@ public void testIntlArrayToLocaleString() throws IOException {
new HashSet<>(
Arrays.asList(
"throws-same-exceptions-as-NumberFormat.js" // Number.prototype.toLocaleString
// didn't throw exception for options
// {"style":"currency"}. Expected a
// TypeError but got a RangeError .. We
// have the same bug in NumberFormat as
// well.. This is because we don't throw
// TypeError from java code yet.
// didn't throw exception for options
// {"style":"currency"}. Expected a
// TypeError but got a RangeError .. We
// have the same bug in NumberFormat as
// well.. This is because we don't throw
// TypeError from java code yet.
));

runTests(basePath, blackList, whilteList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/




import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
Expand All @@ -30,9 +27,9 @@ public void testIntlCollator() throws IOException {
new HashSet<>(
Arrays.asList(
"ignore-invalid-unicode-ext-values.js" // TODO [Follow-up] Failing because Hermes
// array.sort sort is not stable. In-place
// sorting changes the order when the input
// is already sorted with call to array.sort.
// array.sort sort is not stable. In-place
// sorting changes the order when the input
// is already sorted with call to array.sort.
));

Set<String> testIssueList =
Expand Down Expand Up @@ -66,9 +63,9 @@ public void testIntlCollator_prototype_resolvedOptions() throws IOException {
new HashSet<>(
Arrays.asList(
"order.js" // Expected [locale, sensitivity, ignorePunctuation, caseFirst,
// collation, numeric, usage] and [locale, usage, sensitivity,
// ignorePunctuation, collation, numeric, caseFirst] to have the same
// contents.
// collation, numeric, usage] and [locale, usage, sensitivity,
// ignorePunctuation, collation, numeric, caseFirst] to have the same
// contents.
// TODO :: [Follow-up] We fail the above test above we use std::unordered_map to
// hold the options in the C++ binding layer between java/platform code and VM
));
Expand Down Expand Up @@ -102,13 +99,13 @@ public void testIntlCollator_prototype_compare() throws IOException {
pre24Issues.addAll(
Arrays.asList(
"non-normative-sensitivity.js", // Expected [Aa] and [Aa, Aã] to have the same
// contents.. Pre-24 collator object doesn't expose an
// API to specifiy decomposition mode.
// contents.. Pre-24 collator object doesn't expose an
// API to specifiy decomposition mode.
"canonically-equivalent-strings.js" // Collator.compare considers ạ̈ (\u00e4\u0323) ≠
// ạ̈ (\u0061\u0323\u0308). Expected
// SameValue(«-1», «0») to be true. Pre-24
// collator object doesn't expose an API to
// specifiy decomposition mode.
// ạ̈ (\u0061\u0323\u0308). Expected
// SameValue(«-1», «0») to be true. Pre-24
// collator object doesn't expose an API to
// specifiy decomposition mode.
));
}

Expand Down
Loading

0 comments on commit 2790082

Please sign in to comment.