File: double_spec.cr

package info (click to toggle)
crystal 1.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,384 kB
  • sloc: javascript: 6,400; sh: 695; makefile: 269; ansic: 121; python: 105; cpp: 77; xml: 32
file content (9 lines) | stat: -rw-r--r-- 256 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
require "spec"

describe "Double" do
  describe "**" do
    it { (2.5 ** 2).should be_close(6.25, 0.0001) }
    it { (2.5 ** 2.5_f32).should be_close(9.882117688026186, 0.0001) }
    it { (2.5 ** 2.5).should be_close(9.882117688026186, 0.0001) }
  end
end