### ----------------------------------------------------
### -- Graph
### -- Licenses: Artistic-2.0
### -- Authors: Anton Antonov
### -- File: t/03-unary-operations.rakutest
### ----------------------------------------------------
use v6.d;
use Test;

#use lib <. lib>;
use Graph;
use Graph::Cycle;
use Graph::Path;

## 1
my $g1 = Graph::Cycle.new(5, :directed);
ok $g1.reverse;

## 2
ok $g1.complement;

## 3
my $g3 = Graph::Path.new((^5)».Str, :directed);

is
        $g3.reverse.edge-list.sort(*.key).Array,
        (^5).reverse.rotor(2=>-1).map({ $_.head => $_.tail }).sort(*.key).Array;

done-testing;


