test/counter_test.cc
changeset 274 2a33883915bb
parent 171 02f4d5d9bfd7
child 440 88ed40ad0d4f
equal deleted inserted replaced
1:b2d72d734a3f 2:fdf3d661c557
     1 /* -*- C++ -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2008
     5  * Copyright (C) 2003-2008
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
    73   c.reset();
    73   c.reset();
    74 }
    74 }
    75 
    75 
    76 void init(std::vector<int>& v) {
    76 void init(std::vector<int>& v) {
    77   v[0] = 10; v[1] = 60; v[2] = 20; v[3] = 90; v[4] = 100;
    77   v[0] = 10; v[1] = 60; v[2] = 20; v[3] = 90; v[4] = 100;
    78   v[5] = 80; v[6] = 40; v[7] = 30; v[8] = 50; v[9] = 70; 
    78   v[5] = 80; v[6] = 40; v[7] = 30; v[8] = 50; v[9] = 70;
    79 }
    79 }
    80 
    80 
    81 int main()
    81 int main()
    82 {
    82 {
    83   counterTest<Counter>();
    83   counterTest<Counter>();
    84   counterTest<NoCounter>();
    84   counterTest<NoCounter>();
    85   
    85 
    86   std::vector<int> x(10);
    86   std::vector<int> x(10);
    87   init(x); bubbleSort(x);
    87   init(x); bubbleSort(x);
    88   init(x); insertionSort(x);
    88   init(x); insertionSort(x);
    89 
    89 
    90   return 0;
    90   return 0;