source: tests/algorithms/range_test.cfa @ caa3e2c

Last change on this file since caa3e2c was db87a35, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Added more testing of the range iterator.

  • Property mode set to 100644
File size: 705 bytes
RevLine 
[8e658241]1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// range_test.cfa --
8//
9// Author           : Thierry Delisle
10// Created On       : Thu Dec 02 17:13:24 2021
11// Last Modified By :
12// Last Modified On :
13// Update Count     :
14//
15
16#include <fstream.hfa>
17#include <algorithms/range_iterator.hfa>
18
[db87a35]19void print(const char * range){
20        RangeIter r = { range };
21        while(moveNext(r)) {
22                sout | r.com | nonl;
[8e658241]23        }
[db87a35]24        sout | nl;
25}
26
27int main() {
28        print("0-6");
29        print("0");
30        print("0-6,22-30");
31        print("0,2,4,6,8,10");
32        print("0-6,8-14,16,32");
33        print("0-4,6,8-12,14,16-20");
[8e658241]34}
Note: See TracBrowser for help on using the repository browser.