mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-27 05:44:51 +00:00
format code: blank lines
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash;
|
||||
|
||||
import com.jpexs.helpers.FileHashMap;
|
||||
@@ -24,40 +25,40 @@ import static org.testng.Assert.assertTrue;
|
||||
import static org.testng.Assert.fail;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class FileHashMapTest {
|
||||
|
||||
@Test
|
||||
public void testFileHashMap() throws Exception {
|
||||
public void testFileHashMap() throws Exception {
|
||||
File tfile = new File("fmtest.bin");
|
||||
FileHashMap<String,String> map = new FileHashMap<>(tfile);
|
||||
File tfile = new File("fmtest.bin");
|
||||
FileHashMap<String, String> map = new FileHashMap<>(tfile);
|
||||
assertTrue(map.isEmpty());
|
||||
assertEquals(map.size(), 0);
|
||||
map.put("A", "cat");
|
||||
map.put("A", "cat");
|
||||
assertEquals(map.get("A"),"cat");
|
||||
assertEquals(map.get("A"), "cat");
|
||||
assertNull(map.get("B"));
|
||||
map.put("B", "dog");
|
||||
map.put("B", "dog");
|
||||
assertEquals(map.get("B"),"dog");
|
||||
assertEquals(map.get("B"), "dog");
|
||||
assertEquals(map.get("A"), "cat");
|
||||
map.put("C", "parrot");
|
||||
assertTrue(map.containsKey("A"));
|
||||
assertTrue(map.containsKey("B"));
|
||||
assertTrue(map.containsKey("C"));
|
||||
assertTrue(map.containsKey("C"));
|
||||
assertFalse(map.containsKey("D"));
|
||||
assertFalse(map.containsKey("D"));
|
||||
assertEquals(map.size(), 3);
|
||||
map.remove("A");
|
||||
map.remove("A");
|
||||
assertFalse(map.containsKey("A"));
|
||||
map.put("X", "tac");
|
||||
map.delete();
|
||||
map.delete();
|
||||
try {
|
||||
map.get("A");
|
||||
fail();
|
||||
fail();
|
||||
} catch (NullPointerException nfe) {
|
||||
//okay
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user