From: <tho...@us...> - 2010-07-30 00:27:01
|
Revision: 3365 http://bigdata.svn.sourceforge.net/bigdata/?rev=3365&view=rev Author: thompsonbry Date: 2010-07-30 00:26:55 +0000 (Fri, 30 Jul 2010) Log Message: ----------- removed a test for a feature which has not been finished yet. Modified Paths: -------------- trunk/bigdata/src/test/com/bigdata/search/TestKeyBuilder.java Modified: trunk/bigdata/src/test/com/bigdata/search/TestKeyBuilder.java =================================================================== --- trunk/bigdata/src/test/com/bigdata/search/TestKeyBuilder.java 2010-07-30 00:23:00 UTC (rev 3364) +++ trunk/bigdata/src/test/com/bigdata/search/TestKeyBuilder.java 2010-07-30 00:26:55 UTC (rev 3365) @@ -183,74 +183,77 @@ + BytesUtil.toString(b)); } - - /** - * @todo this test needs to populate an index with terms that would match if - * we were allowing a prefix match and then verify that the terms are - * NOT matched. it should also verify that terms that are exact - * matches are matched. - * - * @todo also test ability to extract the docId and fieldId from the key. - * - * @todo refactor into an {@link ITupleSerializer}. - * - * @todo make the fieldId optional in the key. this needs to be part of the - * state of the {@link ITupleSerializer}. - */ - public void test_exactMatch_unicode() { - - final IKeyBuilder keyBuilder = getKeyBuilder(); - - final long docId = 0L; - - final int fieldId = 0; - - // the full term. - final byte[] termSortKey = FullTextIndex.getTokenKey(keyBuilder, "brown", - false/* successor */, docId, fieldId); - - // the successor of the full term allowing prefix matches. - final byte[] termPrefixMatchSuccessor = FullTextIndex.getTokenKey(keyBuilder, "brown", - true/* successor */, docId, fieldId); - -// // the successor of the full term for an exact match. -// final byte[] termExactMatchSuccessor = FullTextIndex.getTokenKey( -// keyBuilder, "brown \0", true/* successor */, docId, fieldId); +/* + * @todo Finish the exact match test. + */ +// /** +// * @todo this test needs to populate an index with terms that would match if +// * we were allowing a prefix match and then verify that the terms are +// * NOT matched. it should also verify that terms that are exact +// * matches are matched. +// * +// * @todo also test ability to extract the docId and fieldId from the key. +// * +// * @todo refactor into an {@link ITupleSerializer}. +// * +// * @todo make the fieldId optional in the key. this needs to be part of the +// * state of the {@link ITupleSerializer}. +// */ +// public void test_exactMatch_unicode() { +// +// final IKeyBuilder keyBuilder = getKeyBuilder(); +// +// final long docId = 0L; +// +// final int fieldId = 0; // +// +// // the full term. +// final byte[] termSortKey = FullTextIndex.getTokenKey(keyBuilder, "brown", +// false/* successor */, docId, fieldId); +// +// // the successor of the full term allowing prefix matches. +// final byte[] termPrefixMatchSuccessor = FullTextIndex.getTokenKey(keyBuilder, "brown", +// true/* successor */, docId, fieldId); +// +//// // the successor of the full term for an exact match. +//// final byte[] termExactMatchSuccessor = FullTextIndex.getTokenKey( +//// keyBuilder, "brown \0", true/* successor */, docId, fieldId); +//// +//// /* +//// * verify sort key order for the full term and its prefix match +//// * successor. +//// */ +//// LT(termSortKey, termPrefixMatchSuccessor); +// +//// /* +//// * verify sort key for the full term orders before its exact match +//// * successor. +//// */ +//// LT(termSortKey, termExactMatchSuccessor); +// +// // term that is longer than the full term. +// final byte[] longerTermSortKey = FullTextIndex.getTokenKey(keyBuilder, +// "browns", false/* successor */, docId, fieldId); +// +// // verify sort order for the full term and the longer term. +// LT(termSortKey, longerTermSortKey); +// // /* -// * verify sort key order for the full term and its prefix match -// * successor. -// */ -// LT(termSortKey, termPrefixMatchSuccessor); - -// /* -// * verify sort key for the full term orders before its exact match -// * successor. -// */ -// LT(termSortKey, termExactMatchSuccessor); - - // term that is longer than the full term. - final byte[] longerTermSortKey = FullTextIndex.getTokenKey(keyBuilder, - "browns", false/* successor */, docId, fieldId); - - // verify sort order for the full term and the longer term. - LT(termSortKey, longerTermSortKey); - - /* - * verify longer term is less than the prefix match successor of the - * full term. - */ - LT(longerTermSortKey, termPrefixMatchSuccessor); - -// /* -// * verify longer term is greater than the exact match successor of the +// * verify longer term is less than the prefix match successor of the // * full term. // */ -// GT(longerTermSortKey, termExactMatchSuccessor); +// LT(longerTermSortKey, termPrefixMatchSuccessor); +// +//// /* +//// * verify longer term is greater than the exact match successor of the +//// * full term. +//// */ +//// GT(longerTermSortKey, termExactMatchSuccessor); +// +// fail("finish test"); +// +// } - fail("finish test"); - - } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |