[Groonga-commit] groonga/grnxx at b9e2de5 [master] Remove an old comment.

Back to archive index

susumu.yata null+****@clear*****
Wed Jan 7 13:45:58 JST 2015


susumu.yata	2015-01-07 13:45:58 +0900 (Wed, 07 Jan 2015)

  New Revision: b9e2de538237b4fa63e2dd6c3b45d2c3372daf56
  https://github.com/groonga/grnxx/commit/b9e2de538237b4fa63e2dd6c3b45d2c3372daf56

  Message:
    Remove an old comment.

  Modified files:
    test/test_index.cpp

  Modified: test/test_index.cpp (+0 -64)
===================================================================
--- test/test_index.cpp    2015-01-07 10:42:39 +0900 (d0cfa3a)
+++ test/test_index.cpp    2015-01-07 13:45:58 +0900 (be7e7b1)
@@ -363,70 +363,6 @@ void test_text_exact_match() {
   }
 }
 
-//void test_text_exact_match() {
-//  grnxx::Error error;
-
-//  // Create a database with the default options.
-//  auto db = grnxx::open_db(&error, "");
-//  assert(db);
-
-//  // Create a table with the default options.
-//  auto table = db->create_table(&error, "Table");
-//  assert(table);
-
-//  // Create a column.
-//  auto column = table->create_column(&error, "Column", grnxx::TEXT_DATA);
-//  assert(column);
-
-//  // Create an index.
-//  auto index = column->create_index(&error, "Index", grnxx::TREE_INDEX);
-//  assert(index);
-
-//  // Generate random values.
-//  // Text: ["0", "99"].
-//  grnxx::Array<grnxx::Text> values;
-//  char bodies[100][3];
-//  assert(values.resize(&error, NUM_ROWS + 1));
-//  for (int i = 0; i < 100; ++i) {
-//    std::sprintf(bodies[i], "%d", i);
-//  }
-//  for (grnxx::Int i = 1; i <= NUM_ROWS; ++i) {
-//    values.set(i, bodies[rng() % 100]);
-//  }
-
-//  // Store generated values into columns.
-//  for (grnxx::Int i = 1; i <= NUM_ROWS; ++i) {
-//    grnxx::Int row_id;
-//    assert(table->insert_row(&error, grnxx::NULL_ROW_ID,
-//                             grnxx::Datum(), &row_id));
-//    assert(row_id == i);
-//    assert(column->set(&error, row_id, values[i]));
-//  }
-
-//  // Test cursors for each value.
-//  for (int int_value = 0; int_value < 100; ++int_value) {
-//    grnxx::Text value = bodies[int_value];
-
-//    auto cursor = index->find(&error, value);
-//    assert(cursor);
-
-//    grnxx::Array<grnxx::Record> records;
-//    auto result = cursor->read_all(&error, &records);
-//    assert(result.is_ok);
-//    for (grnxx::Int i = 1; i < records.size(); ++i) {
-//      assert(values[records.get_row_id(i)] == value);
-//    }
-
-//    grnxx::Int count = 0;
-//    for (grnxx::Int i = 1; i <= NUM_ROWS; ++i) {
-//      if (values[i] == value) {
-//        ++count;
-//      }
-//    }
-//    assert(count == records.size());
-//  }
-//}
-
 void test_int_range() {
   // Create a column.
   auto db = grnxx::open_db("");
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index