Skip to content
Snippets Groups Projects
Select Git revision
  • f25c65287630b2b069a25c81248e249c1641df71
  • master default protected
2 results

splay_operation_more_tests.cpp

Blame
  • splay_operation_more_tests.cpp 551 B
    #include <algorithm>
    #include <cassert>
    #include <fstream>
    #include <functional>
    #include <string>
    #include <utility>
    #include <vector>
    
    #include "splay_operation.h"
    
    using namespace std;
    
    const int elements = 5000000;
    
    void test_failed_insert() {
    
        // Test speed
        {
            Tree tree;
            for (int i = 0; i < elements; i++)
                tree.insert(i);
            
            for (int i = 0; i < 2*elements; i++)
                tree.insert(0);
        }
    }
    
    vector<pair<string, function<void()>>> tests = {
        { "failed_insert", test_failed_insert },
    };