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.39 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.38 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.37 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.36 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.35 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.34 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.33 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.32 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.31 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.30 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.29 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.28 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.27 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.26 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.25 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.24 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.23 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.22 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.21 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.20 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart