From 1440d9c47ee8c51a343d02851ebebc7dd561ac13 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 5 Jul 2018 14:49:39 +0200 Subject: [PATCH] Add new tests --- .../MDLColorTests.class/instance/testIsAccentuated.st | 4 ++++ .../MDLColorTests.class/instance/testTint.st | 6 ++++++ .../MDLColorTests.class/instance/testTintCode.st | 6 ++++++ 3 files changed, 16 insertions(+) create mode 100644 src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testIsAccentuated.st create mode 100644 src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTint.st create mode 100644 src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTintCode.st diff --git a/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testIsAccentuated.st b/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testIsAccentuated.st new file mode 100644 index 0000000..5cfeb88 --- /dev/null +++ b/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testIsAccentuated.st @@ -0,0 +1,4 @@ +tests +testIsAccentuated + self deny: (MDLColor tint: #orange code: '500') isAccentuated. + self assert: (MDLColor tint: #orange code: 'A400' ) isAccentuated \ No newline at end of file diff --git a/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTint.st b/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTint.st new file mode 100644 index 0000000..f675b50 --- /dev/null +++ b/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTint.st @@ -0,0 +1,6 @@ +tests +testTint + self assert: (MDLColor tint: #orange) equals: MDLColor orange. + "Ensure String and Symbol works" + self assert: (MDLColor tint: 'orange') equals: MDLColor orange. + self assert: (MDLColor tint: #orange) asRGBA equals: 'rgba(255,152,0,1)' \ No newline at end of file diff --git a/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTintCode.st b/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTintCode.st new file mode 100644 index 0000000..2449a29 --- /dev/null +++ b/src/Material-Design-Tests-Colors.package/MDLColorTests.class/instance/testTintCode.st @@ -0,0 +1,6 @@ +tests +testTintCode + self assert: (MDLColor tint: #orange code: #'800') asRGBA equals: 'rgba(239,108,0,1)'. + "Ensure String and Symbol works" + self assert: (MDLColor tint: 'orange' code: #'800') asRGBA equals: 'rgba(239,108,0,1)'. + self assert: (MDLColor tint: 'orange' code: '800') asRGBA equals: 'rgba(239,108,0,1)'. \ No newline at end of file