Skip to content

Commit

Permalink
Add @GwtIncompatible to a bunch of tests that had neither that nor …
Browse files Browse the repository at this point in the history
…`@GwtCompatible`.

Such changes are no-ops, given that we construct our test suite based on the presence of `@GwtCompatible`.

PiperOrigin-RevId: 572171057
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Oct 10, 2023
1 parent d316455 commit 27b4428
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@

package com.google.common.base;

import com.google.common.annotations.GwtIncompatible;
import junit.framework.TestCase;

/**
* Unit test for {@link Defaults}.
*
* @author Jige Yu
*/
@GwtIncompatible
public class DefaultsTest extends TestCase {
public void testGetDefaultValue() {
assertEquals(false, Defaults.defaultValue(boolean.class).booleanValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.common.base;

import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.internal.Finalizer;
import com.google.common.testing.GcFinalization;
import java.lang.ref.ReferenceQueue;
Expand All @@ -36,6 +37,7 @@
// - .class files aren't available
// - possibly no real concept of separate ClassLoaders?
@AndroidIncompatible
@GwtIncompatible
public class FinalizableReferenceQueueTest extends TestCase {

private @Nullable FinalizableReferenceQueue frq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

package com.google.common.base;

import com.google.common.annotations.GwtIncompatible;
import com.google.common.testing.AbstractPackageSanityTests;

/** Basic sanity tests for classes in {@code common.base}. */

@GwtIncompatible
public class PackageSanityTests extends AbstractPackageSanityTests {
public PackageSanityTests() {
// package private classes like FunctionalEquivalence are tested through the public API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
import static com.google.common.base.StandardSystemProperty.JAVA_EXT_DIRS;
import static com.google.common.truth.Truth.assertWithMessage;

import com.google.common.annotations.GwtIncompatible;
import junit.framework.TestCase;

/**
* Tests for {@link StandardSystemProperty}.
*
* @author Kurt Alfred Kluever
*/
@GwtIncompatible
public class StandardSystemPropertyTest extends TestCase {

public void testGetKeyMatchesString() {
Expand Down
2 changes: 2 additions & 0 deletions guava-tests/test/com/google/common/base/DefaultsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@

package com.google.common.base;

import com.google.common.annotations.GwtIncompatible;
import junit.framework.TestCase;

/**
* Unit test for {@link Defaults}.
*
* @author Jige Yu
*/
@GwtIncompatible
public class DefaultsTest extends TestCase {
public void testGetDefaultValue() {
assertEquals(false, Defaults.defaultValue(boolean.class).booleanValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.common.base;

import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.internal.Finalizer;
import com.google.common.testing.GcFinalization;
import java.lang.ref.ReferenceQueue;
Expand All @@ -36,6 +37,7 @@
// - .class files aren't available
// - possibly no real concept of separate ClassLoaders?
@AndroidIncompatible
@GwtIncompatible
public class FinalizableReferenceQueueTest extends TestCase {

private @Nullable FinalizableReferenceQueue frq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

package com.google.common.base;

import com.google.common.annotations.GwtIncompatible;
import com.google.common.testing.AbstractPackageSanityTests;

/** Basic sanity tests for classes in {@code common.base}. */

@GwtIncompatible
public class PackageSanityTests extends AbstractPackageSanityTests {
public PackageSanityTests() {
// package private classes like FunctionalEquivalence are tested through the public API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
import static com.google.common.base.StandardSystemProperty.JAVA_EXT_DIRS;
import static com.google.common.truth.Truth.assertWithMessage;

import com.google.common.annotations.GwtIncompatible;
import junit.framework.TestCase;

/**
* Tests for {@link StandardSystemProperty}.
*
* @author Kurt Alfred Kluever
*/
@GwtIncompatible
public class StandardSystemPropertyTest extends TestCase {

public void testGetKeyMatchesString() {
Expand Down

0 comments on commit 27b4428

Please sign in to comment.