コード例 #1
0
ファイル: test_hashtable.cpp プロジェクト: kjsd/KJSD
static const char* test_empty()
{
    // setUp()が実行されているので空ではないはず?
    KJSD_CUNIT_ASSERT(!(htv_->empty()));
    KJSD_CUNIT_ASSERT(!(htc_->empty()));
    KJSD_CUNIT_ASSERT(!(htp_->empty()));

    HashTable<int, int> tmp;
    // 新規作成オブジェクトなので空のはず?
    KJSD_CUNIT_ASSERT(tmp.empty());

    HashTable<string, int> tmps;
    KJSD_CUNIT_ASSERT(tmps.empty());

    HashTable<const char*, int> tmpp;
    KJSD_CUNIT_ASSERT(tmpp.empty());
    return 0;
}
コード例 #2
0
ファイル: string_map.hpp プロジェクト: Distrotech/aspell
 bool empty() const {return lookup_.empty();}