Skip to content

Commit

Permalink
Ignore tests on Windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
sjudd committed Apr 30, 2015
1 parent f744d04 commit cd49c1d
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,26 @@

package com.bumptech.glide.disklrucache;

import static com.bumptech.glide.disklrucache.DiskLruCache.JOURNAL_FILE;
import static com.bumptech.glide.disklrucache.DiskLruCache.JOURNAL_FILE_BACKUP;
import static com.bumptech.glide.disklrucache.DiskLruCache.MAGIC;
import static com.bumptech.glide.disklrucache.DiskLruCache.VERSION_1;
import static org.fest.assertions.api.Assertions.assertThat;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assume.assumeThat;

import junit.framework.Assert;

import org.apache.commons.io.FileUtils;
import org.hamcrest.core.StringStartsWith;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.junit.rules.TemporaryFolder;

import java.io.BufferedReader;
import java.io.File;
Expand All @@ -39,12 +49,6 @@
import java.util.List;
import java.util.concurrent.TimeUnit;

import static com.bumptech.glide.disklrucache.DiskLruCache.JOURNAL_FILE;
import static com.bumptech.glide.disklrucache.DiskLruCache.JOURNAL_FILE_BACKUP;
import static com.bumptech.glide.disklrucache.DiskLruCache.MAGIC;
import static com.bumptech.glide.disklrucache.DiskLruCache.VERSION_1;
import static org.fest.assertions.api.Assertions.assertThat;

@RunWith(JUnit4.class)
public final class DiskLruCacheTest {
private final int appVersion = 100;
Expand All @@ -55,6 +59,11 @@ public final class DiskLruCacheTest {

@Rule public TemporaryFolder tempDir = new TemporaryFolder();

@BeforeClass
public static void setUpClass() {
assumeThat(System.getProperty("os.name"), not(StringStartsWith.startsWith("Windows")));

This comment has been minimized.

Copy link
@TWiStErRob

TWiStErRob Apr 30, 2015

You may have (intentionally?) missed a static import here.
Btw, you can import both not and startsWith from CoreMatchers so it's cleaner, it was late yesterday :)

}

@Before public void setUp() throws Exception {
cacheDir = tempDir.newFolder("DiskLruCacheTest");
journalFile = new File(cacheDir, JOURNAL_FILE);
Expand Down

0 comments on commit cd49c1d

Please sign in to comment.