src/test/graph_test.cc
changeset 1014 aae850a2394d
parent 980 0f1044b7a3af
child 1022 567f392d1d2e
equal deleted inserted replaced
28:2c244e17b301 29:01e344c4d592
    18 
    18 
    19 
    19 
    20 int main() {
    20 int main() {
    21   ///\file
    21   ///\file
    22   { // checking graph components
    22   { // checking graph components
    23     function_requires<BaseGraphComponentConcept<BaseGraphComponent> >();
    23     checkConcept<BaseGraphComponent, BaseGraphComponent >();
    24 
    24 
    25     function_requires<BaseIterableGraphComponentConcept<BaseIterableGraphComponent> >();
    25     checkConcept<BaseIterableGraphComponent, BaseIterableGraphComponent >();
    26 
    26 
    27     function_requires<IDableGraphComponentConcept<IDableGraphComponent> >();
    27     checkConcept<IDableGraphComponent, IDableGraphComponent >();
    28     function_requires<MaxIDableGraphComponentConcept<MaxIDableGraphComponent> >();
    28     checkConcept<MaxIDableGraphComponent, MaxIDableGraphComponent >();
    29 
    29 
    30     function_requires<BaseExtendableGraphComponentConcept<BaseExtendableGraphComponent> >();
    30     checkConcept<BaseExtendableGraphComponent, BaseExtendableGraphComponent >();
    31     function_requires<BaseErasableGraphComponentConcept<BaseErasableGraphComponent> >();
    31     checkConcept<BaseErasableGraphComponent, BaseErasableGraphComponent >();
    32     function_requires<BaseClearableGraphComponentConcept<BaseClearableGraphComponent> >();
    32     checkConcept<BaseClearableGraphComponent, BaseClearableGraphComponent >();
    33 
    33 
    34     function_requires<IterableGraphComponentConcept<IterableGraphComponent> >();
    34     checkConcept<IterableGraphComponent, IterableGraphComponent >();
    35 
    35 
    36     function_requires<MappableGraphComponentConcept<MappableGraphComponent> >();
    36     checkConcept<MappableGraphComponent, MappableGraphComponent >();
    37 
    37 
    38     function_requires<ExtendableGraphComponentConcept<ExtendableGraphComponent> >();
    38     checkConcept<ExtendableGraphComponent, ExtendableGraphComponent >();
    39     function_requires<ErasableGraphComponentConcept<ErasableGraphComponent> >();
    39     checkConcept<ErasableGraphComponent, ErasableGraphComponent >();
    40     function_requires<ClearableGraphComponentConcept<ClearableGraphComponent> >();
    40     checkConcept<ClearableGraphComponent, ClearableGraphComponent >();
    41   }
    41   }
    42   { // checking skeleton graphs
    42   { // checking skeleton graphs
    43     function_requires<StaticGraphConcept<StaticGraph> >();
    43     checkConcept<StaticGraph, StaticGraph >();
    44     function_requires<ExtendableGraphConcept<ExtendableGraph> >();
    44     checkConcept<ExtendableGraph, ExtendableGraph >();
    45     function_requires<ErasableGraphConcept<ErasableGraph> >();
    45     checkConcept<ErasableGraph, ErasableGraph >();
    46   }
    46   }
    47   { // checking list graph
    47   { // checking list graph
    48     function_requires<ErasableGraphConcept<ListGraph> >();
    48     checkConcept<ErasableGraph, ListGraph >();
    49 
    49 
    50     checkGraph<ListGraph>();
    50     checkGraph<ListGraph>();
    51     checkGraphNodeMap<ListGraph>();
    51     checkGraphNodeMap<ListGraph>();
    52     checkGraphEdgeMap<ListGraph>();
    52     checkGraphEdgeMap<ListGraph>();
    53   }
    53   }
    54   { // checking smart graph
    54   { // checking smart graph
    55     function_requires<ExtendableGraphConcept<SmartGraph> >();
    55     checkConcept<ExtendableGraph, SmartGraph >();
    56 
    56 
    57     checkGraph<SmartGraph>();
    57     checkGraph<SmartGraph>();
    58     checkGraphNodeMap<SmartGraph>();
    58     checkGraphNodeMap<SmartGraph>();
    59     checkGraphEdgeMap<SmartGraph>();
    59     checkGraphEdgeMap<SmartGraph>();
    60   }
    60   }
    61   { // checking full graph
    61   { // checking full graph
    62     function_requires<StaticGraphConcept<FullGraph> >();
    62     checkConcept<StaticGraph, FullGraph >();
    63   }
    63   }
    64 
    64 
    65   std::cout << __FILE__ ": All tests passed.\n";
    65   std::cout << __FILE__ ": All tests passed.\n";
    66 
    66 
    67   return 0;
    67   return 0;