static int __init test_treemap_init(void) { printk(KERN_INFO "test_treemap_init begin\n"); if (!initialize()) { printk(KERN_ERR "initialize() failed.\n"); goto error; } /* Treemap test for debug. */ if (map_test()) { printk(KERN_ERR "map_test() failed.\n"); goto error; } if (map_cursor_test()) { printk(KERN_ERR "map_cursor_test() failed.\n"); goto error; } if (multimap_test()) { printk(KERN_ERR "multimap_test() failed.\n"); goto error; } if (multimap_cursor_test()) { printk(KERN_ERR "multimap_cursor_test() failed.\n"); goto error; } finalize(); printk(KERN_INFO "test_treemap_init end\n"); error: return -1; }
void part_two_describe() { cout<<"******************************************"<<endl; cout<<"* 第二章 C++ STL泛型编程 *"<<endl; cout<<"******************************************"<<endl; cout<<"*(1) 一个简单的测试案例 *"<<endl; cout<<"*(2) vector向量容器 *"<<endl; cout<<"*(3) string基本字符系列容器 *"<<endl; cout<<"*(4) set集合容器 *"<<endl; cout<<"*(5) mutiset多种集合容器 *"<<endl; cout<<"*(6) map映照容器 *"<<endl; cout<<"*(7) mutimap多重映照容器 *"<<endl; cout<<"*(8) deque双端队列容器 *"<<endl; cout<<"*(9) list双向链表容器 *"<<endl; cout<<"*(10)bitset位集合容器 *"<<endl; cout<<"*(11)stack堆栈容器 *"<<endl; cout<<"*(12)queue队列容器 *"<<endl; cout<<"*(13)priority_queue优先队列容器 *"<<endl; cout<<"******************************************"<<endl; cout<<"请输入对应的编号进入相应的题目(返回上级输入0):"<<endl; int num; cin>>num; while(num!=0&&num!=1&&num!=2&&num!=3&&num!=4&&num!=5&&num!=6&&num!=7&&num!=8&&num!=9&&num!=10&&num!=11&&num!=12&&num!=13){ cout<<"编号不存在"<<endl; cout<<"请输入对应的编号进入相应的题目(返回上级输入0):"<<endl; cin>>num; } switch(num){ case 0:total_describe();break; case 1:test();break; case 2:vector_test();break; case 3:string_test();break; case 4:set_test();break; case 5:multiset_test();break; case 6:map_test();break; case 7:multimap_test();break; case 8:deque_test();break; case 9:list_test();break; case 10:bitset_test();break; case 11:stack_test();break; case 12:queue_test();break; case 13:priority_queue_test();break; } }