/* * Copyright (c) 2013 Websquared, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v2.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * swsong - initial API and implementation */ package org.fastcatsearch.keyword; import java.util.Iterator; import java.util.Random; //import org.fastcatsearch.keyword.KeywordHit; //import org.fastcatsearch.keyword.MemoryKeyword; import junit.framework.TestCase; public class MemoryKeywordTest extends TestCase{ public void test1(){ // int TEST_COUNT = 1000000; // // MemoryKeyword memoryKeyword = new MemoryKeyword(9 * 1024); // // String[] keywordList = {"독서", "인구", "책", "독서량", "양극화", "조짐", "문화체육관광부", "우리나라", "구입비", "일반도서", "성인", "운동", "집안일"}; // // Random r = new Random(); // for(int i=0; i< TEST_COUNT; i++){ // int n = r.nextInt(keywordList.length); // memoryKeyword.put(keywordList[n]); // } // // Iterator<KeywordHit> iter = memoryKeyword.getIterator(TEST_COUNT); // // while(iter.hasNext()){ // System.out.println(iter.next()); // } } }