#!/usr/bin/env perl use strict; use warnings; use Test::More; use DDG::Test::Goodie; zci answer_type => 'root'; zci is_cached => 1; ddg_goodie_test( [qw( DDG::Goodie::CalcRoots )], 'square root of negative 9' => test_zci( "The 2-root of -9 is 3 i", heading => "Root Calculator", structured_answer => { input => ["2-root of -9"], operation => 'Calculate', result => "2√-9 = 3i" } ), 'negative square root of negative 25' =>test_zci( "The -2-root of -25 is -5 i", heading => "Root Calculator", structured_answer => { input => ["-2-root of -25"], operation => 'Calculate', result => "-2√-25 = -5i" } ), '2nd root of 100' => test_zci( "The 2-root of 100 is 10.", heading => "Root Calculator", structured_answer => { input => ["2-root of 100"], operation => 'Calculate', result => qq|2√100 = 10| } ), 'cube root of 33' => test_zci( "The 3-root of 33 is 3.20753432999583.", heading => "Root Calculator", structured_answer => { input => ["3-root of 33"], operation => 'Calculate', result => qq|3√33 = 3.20753432999583| } ), ); done_testing;