Sha256: 6c2ebf8c0b41828ad414ef500c7853712d3632df603cb398e5ff519ec3d0eebe

Contents?: true

Size: 1.91 KB

Versions: 66

Compression:

Stored size: 1.91 KB

Contents

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

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

  group('DifferenceOfSquares', () {
    group('Square the sum of the numbers up to the given number', () {
      test("square of sum 1", () {
        final num result = differenceOfSquares.squareOfSum(1);
        expect(result, equals(1));
      }, skip: false);

      test("square of sum 5", () {
        final num result = differenceOfSquares.squareOfSum(5);
        expect(result, equals(225));
      }, skip: true);

      test("square of sum 100", () {
        final num result = differenceOfSquares.squareOfSum(100);
        expect(result, equals(25502500));
      }, skip: true);
    });

    group('Sum the squares of the numbers up to the given number', () {
      test("sum of squares 1", () {
        final num result = differenceOfSquares.sumOfSquare(1);
        expect(result, equals(1));
      }, skip: true);

      test("sum of squares 5", () {
        final num result = differenceOfSquares.sumOfSquare(5);
        expect(result, equals(55));
      }, skip: true);

      test("sum of squares 100", () {
        final num result = differenceOfSquares.sumOfSquare(100);
        expect(result, equals(338350));
      }, skip: true);
    });

    group('Subtract sum of squares from square of sums', () {
      test("difference of squares 1", () {
        final num result = differenceOfSquares.differenceOfSquares(1);
        expect(result, equals(0));
      }, skip: true);

      test("difference of squares 5", () {
        final num result = differenceOfSquares.differenceOfSquares(5);
        expect(result, equals(170));
      }, skip: true);

      test("difference of squares 100", () {
        final num result = differenceOfSquares.differenceOfSquares(100);
        expect(result, equals(25164150));
      }, skip: true);
    });
  });
}

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.179 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.178 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.177 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.176 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.175 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.174 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.173 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.172 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.171 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.170 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.169 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.167 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.166 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.165 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.164 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.163 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.162 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.161 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart
trackler-2.2.1.160 tracks/dart/exercises/difference-of-squares/test/difference_of_squares_test.dart