Sha256: fc5a2a1d22e57669d34feade0dd1c820ff1b27468b92d2ab38cc4f6cb7611011
Contents?: true
Size: 1.19 KB
Versions: 24
Compression:
Stored size: 1.19 KB
Contents
import org.scalatest.{Matchers, FunSuite} /** @version 1.0.0 */ class ArmstrongNumbersTest extends FunSuite with Matchers { test("Single digit numbers are Armstrong numbers") { ArmstrongNumbers.isArmstrongNumber(5) should be (true) } test("There are no 2 digit Armstrong numbers") { pending ArmstrongNumbers.isArmstrongNumber(10) should be (false) } test("Three digit number that is an Armstrong number") { pending ArmstrongNumbers.isArmstrongNumber(153) should be (true) } test("Three digit number that is not an Armstrong number") { pending ArmstrongNumbers.isArmstrongNumber(100) should be (false) } test("Four digit number that is an Armstrong number") { pending ArmstrongNumbers.isArmstrongNumber(9474) should be (true) } test("Four digit number that is not an Armstrong number") { pending ArmstrongNumbers.isArmstrongNumber(9475) should be (false) } test("Seven digit number that is an Armstrong number") { pending ArmstrongNumbers.isArmstrongNumber(9926315) should be (true) } test("Seven digit number that is not an Armstrong number") { pending ArmstrongNumbers.isArmstrongNumber(9926314) should be (false) } }
Version data entries
24 entries across 24 versions & 1 rubygems