Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 test fail if current locale has different decimal separator #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import java.io.PrintStream;
import java.io.Reader;
import java.nio.file.Path;
import java.util.Locale;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
Expand All @@ -46,6 +48,7 @@ public class PrintDeviceTargetingConfigCommandTest {
@Before
public void setUp() {
Path tmpDir = tmp.getRoot().toPath();
Locale.setDefault(Locale.forLanguageTag("en-US"));
deviceTargetingConfigPath = tmpDir.resolve("config.json");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,21 @@
import com.android.tools.build.bundletool.model.SizeConfiguration;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import java.util.Locale;

@RunWith(JUnit4.class)
public class GetSizeCsvUtilsTest {

@Before
public void setUp() {
Locale.setDefault(Locale.forLanguageTag("en-US"));
}

@Test
public void getSizeTotalOutputInCsv_emptyDimensions() {
assertThat(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@

import static com.google.common.truth.Truth.assertThat;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import java.nio.file.Path;
import java.util.Locale;

@RunWith(JUnit4.class)
public class SizeFormatterTest {

@Before
public void setUp() {
Locale.setDefault(Locale.forLanguageTag("en-US"));
}

@Test
public void rawFormatter() {
SizeFormatter formatter = SizeFormatter.rawFormatter();
Expand Down