Sha256: 68fbe4c8e4b7a92a5a2bc377ec0c305e1abe6ed6880b9d780f942f4e6b70eb1c

Contents?: true

Size: 1.24 KB

Versions: 54

Compression:

Stored size: 1.24 KB

Contents

import "package:test/test.dart";
import "package:difference_of_squares/difference_of_squares.dart";

void main() {
  final squares = new DifferenceOfSquares();

  group("DifferenceOfSquares", () {
    group("#squareOfSums()", () {
      test("square of sum 1", () {
        expect(squares.squareOfSums(1), equals(1));
      });

      test("square of sum 5", () {
        expect(squares.squareOfSums(5), equals(225));
      });

      test("square of sum 100", () {
        expect(squares.squareOfSums(100), equals(25502500));
      });
    });

    group("#sumOfSquares()", () {
      test("sum of squares 1", () {
        expect(squares.sumOfSquares(1), equals(1));
      });

      test("sum of squares 5", () {
        expect(squares.sumOfSquares(5), equals(55));
      });

      test("sum of squares 100", () {
        expect(squares.sumOfSquares(100), equals(338350));
      });
    });

    group("#difference()", () {
      test("difference of squares 1", () {
        expect(squares.difference(1), equals(0));
      });

      test("difference of squares 5", () {
        expect(squares.difference(5), equals(170));
      });

      test("difference of squares 100", () {
        expect(squares.difference(100), equals(25164150));
      });
    });
  });
}

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
trackler-2.2.1.19 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.18 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.17 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.16 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.15 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.14 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.13 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.12 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.11 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.10 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.9 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.8 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.7 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.6 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.5 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.4 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.3 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.2 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.1 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.0 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart