Changeset 2879 for trunk/test/split.cc


Ignore:
Timestamp:
Nov 16, 2012, 2:47:56 AM (10 years ago)
Author:
Peter
Message:

split function that splits on several chars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/split.cc

    r2370 r2879  
    22
    33/*
    4   Copyright (C) 2010 Peter Johansson
     4  Copyright (C) 2010, 2012 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2929using namespace theplu::yat;
    3030
     31template<typename T>
    3132void test_split(const std::vector<std::string>& correct, const std::string& str,
    32                 char delim, test::Suite& suite);
     33                T delim, test::Suite& suite);
    3334
    3435int main(int argc, char* argv[])
     
    5354  test_split(correct, "banan", 'n', suite);
    5455
     56  correct[0]="split";
     57  correct[1]="me";
     58  correct[2]="please";
     59  test_split(correct, "split,me;please", ";,", suite);
     60
     61
    5562  return suite.return_value();
    5663}
    5764
     65  template<typename T>
    5866void test_split(const std::vector<std::string>& correct, const std::string& str,
    59                 char delim, test::Suite& suite)
     67                T delim, test::Suite& suite)
    6068{
    6169  suite.out() << "split(vec, \"" << str << "\", '" << delim << "')\n";
Note: See TracChangeset for help on using the changeset viewer.