Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test tau and τ
  • Loading branch information
Juerd committed Dec 3, 2015
1 parent a04df5f commit d43b6ef
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions S32-num/pi.t
@@ -1,14 +1,14 @@
use v6;
use Test;
plan 5;
plan 8;

# L<S32::Numeric/Numeric/"Numeric provides some constants">

=begin pod
=head1 DESCRIPTION
Basic tests for builtin Num::pi
Basic tests for builtin Num::pi and Num::tau
=end pod

Expand All @@ -26,4 +26,11 @@ is_approx(EVAL("pi + 3"), $PI+3, "pi+3, as a bareword");

is_approx(π, $PI, "unicode π as a bareword");

# Tau, see also: L<"http://tauday.com/tau-digits">
is(EVAL("tau"), EVAL("2 * pi"), "pi = tau / 2");

throws-like "3 + tau()", X::Undeclared, "tau() is not a sub";

is_approx(τ, 2*$PI, "unicode τ as a bareword");

# vim: ft=perl6

0 comments on commit d43b6ef

Please sign in to comment.