Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/Pharo11CI.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
name: 'Pharo 11 CI'
name: 'CI'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

on:
push:
branches:
- 'master'
- 'main'
pull_request:
types: [assigned, opened, synchronize, reopened]

jobs:
build:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
smalltalk: [ Pharo64-11 ]
smalltalk: [ Pharo64-11, Pharo64-12, Pharo64-13 ]
ston: [ .smalltalkci.default.ston ]
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
name: >
${{ matrix.smalltalk }} • ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load in New Image and Run Tests

- name: Run ${{ matrix.ston == '.smalltalkci.default.ston' && 'Full' || 'Core' }} tests
run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }}
shell: bash
timeout-minutes: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 30
28 changes: 0 additions & 28 deletions .github/workflows/Pharo12CI.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/Pharo13CI.yml

This file was deleted.

File renamed without changes.
54 changes: 28 additions & 26 deletions OpenSmock-Iconography-Tests/AntDesignIconsLibraryTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -105,32 +105,34 @@ AntDesignIconsLibraryTest >> tearDown [
{ #category : #tests }
AntDesignIconsLibraryTest >> testAntDesignIconNamed [

self assert: (self antIconNamed: #checkCircle) identicalTo: (AntDesignIconsLibrary name: #checkCircle) form.
self
assert: (self antIconNamed: #checkCircle) bits
equals: (AntDesignIconsLibrary name: #checkCircle) form bits
]

{ #category : #tests }
AntDesignIconsLibraryTest >> testAntDesignIconNamedStyle [

| filledCheckCircleIcon outlinedCheckCircleIcon |
filledCheckCircleIcon := (AntDesignIconsLibrary name: #checkCircle) form.
filledCheckCircleIcon := (AntDesignIconsLibrary name: #checkCircle) form bits.

self assert: (self antFilledIconNamed: #checkCircle) identicalTo: filledCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: #filled) identicalTo: filledCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: AntDesignIconsStyle filled) identicalTo: filledCheckCircleIcon.
self assert: (self antFilledIconNamed: #checkCircle) bits equals: filledCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: #filled) bits equals: filledCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: AntDesignIconsStyle filled) bits equals: filledCheckCircleIcon.

self deny: (self antOutlinedIconNamed: #checkCircle) identicalTo: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: #outlined) identicalTo: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: AntDesignIconsStyle outlined) identicalTo: filledCheckCircleIcon.
self deny: (self antOutlinedIconNamed: #checkCircle) bits equals: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: #outlined) bits equals: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: AntDesignIconsStyle outlined) bits equals: filledCheckCircleIcon.

self deny: (self antTwoToneIconNamed: #checkCircle) identicalTo: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: #twoTone) identicalTo: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: AntDesignIconsStyle twoTone) identicalTo: filledCheckCircleIcon.
self deny: (self antTwoToneIconNamed: #checkCircle) bits equals: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: #twoTone) bits equals: filledCheckCircleIcon.
self deny: (self antIconNamed: #checkCircle style: AntDesignIconsStyle twoTone) bits equals: filledCheckCircleIcon.

outlinedCheckCircleIcon := (AntDesignIconsLibrary name: #checkCircle style: #outlined) form.
outlinedCheckCircleIcon := (AntDesignIconsLibrary name: #checkCircle style: #outlined) form bits.

self assert: (self antOutlinedIconNamed: #checkCircle) identicalTo: outlinedCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: #outlined) identicalTo: outlinedCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: AntDesignIconsStyle outlined) identicalTo: outlinedCheckCircleIcon.
self assert: (self antOutlinedIconNamed: #checkCircle) bits equals: outlinedCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: #outlined) bits equals: outlinedCheckCircleIcon.
self assert: (self antIconNamed: #checkCircle style: AntDesignIconsStyle outlined) bits equals: outlinedCheckCircleIcon.
]

{ #category : #tests }
Expand All @@ -152,17 +154,17 @@ AntDesignIconsLibraryTest >> testGetAndCacheIcon [

self
assert:
(AntDesignIconsLibrary currentThemeIcons iconNamed: #checkCircle) form
equals: AntDesignIconsLibrary currentThemeIcons notFound.
(AntDesignIconsLibrary currentThemeIcons iconNamed: #checkCircle) form bits
equals: AntDesignIconsLibrary currentThemeIcons notFound bits.

icon := (AntDesignIconsLibrary name: #checkCircle) form.
icon := (AntDesignIconsLibrary name: #checkCircle) form bits.
self
deny: icon
equals: AntDesignIconsLibrary currentThemeIcons notFound.
equals: AntDesignIconsLibrary currentThemeIcons notFound bits.
self
deny:
(AntDesignIconsLibrary currentThemeIcons iconNamed: #checkCircle) form
equals: AntDesignIconsLibrary currentThemeIcons notFound
(AntDesignIconsLibrary currentThemeIcons iconNamed: #checkCircle) form bits
equals: AntDesignIconsLibrary currentThemeIcons notFound bits
]

{ #category : #tests }
Expand All @@ -175,19 +177,19 @@ AntDesignIconsLibraryTest >> testLibraryName [
AntDesignIconsLibraryTest >> testNameWithSymbolOrString [
| iconA iconB |

iconA := (AntDesignIconsLibrary name: 'checkSquare') form.
iconB := (AntDesignIconsLibrary name: #'checkSquare') form.
iconA := (AntDesignIconsLibrary name: 'checkSquare') form bits.
iconB := (AntDesignIconsLibrary name: #'checkSquare') form bits.

self deny: iconA equals: AntDesignIconsLibrary currentThemeIcons notFound.
self deny: iconA equals: AntDesignIconsLibrary currentThemeIcons notFound bits.
self assert: iconA equals: iconB.
]

{ #category : #tests }
AntDesignIconsLibraryTest >> testNotFoundIcon [

self
assert: (AntDesignIconsLibrary name: #test_NotFoundIcon) form
equals: AntDesignIconsLibrary currentThemeIcons notFound
assert: (AntDesignIconsLibrary name: #test_NotFoundIcon) form bits
equals: AntDesignIconsLibrary currentThemeIcons notFound bits
]

{ #category : #tests }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ MaterialDesignIcons4LibraryTest >> testGetAndCacheIcon [

self
assert:
(MaterialDesignIconsLibrary currentThemeIcons iconNamed: #check_circle) form
equals: MaterialDesignIconsLibrary currentThemeIcons notFound.
(MaterialDesignIconsLibrary currentThemeIcons iconNamed: #check_circle) form bits
equals: MaterialDesignIconsLibrary currentThemeIcons notFound bits.

icon := (MaterialDesignIconsLibrary name: #check_circle) form.
icon := (MaterialDesignIconsLibrary name: #check_circle) form bits.
self
deny: icon
equals: MaterialDesignIconsLibrary currentThemeIcons notFound.
equals: MaterialDesignIconsLibrary currentThemeIcons notFound bits.
self
deny:
(MaterialDesignIconsLibrary currentThemeIcons iconNamed: #check_circle) form
equals: MaterialDesignIconsLibrary currentThemeIcons notFound
(MaterialDesignIconsLibrary currentThemeIcons iconNamed: #check_circle) form bits
equals: MaterialDesignIconsLibrary currentThemeIcons notFound bits
]

{ #category : #tests }
Expand All @@ -134,40 +134,40 @@ MaterialDesignIcons4LibraryTest >> testLibraryName [
{ #category : #tests }
MaterialDesignIcons4LibraryTest >> testMaterialDesignIconNamed [

self assert: (self materialIconNamed: #check_circle) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self assert: (self materialFilledIconNamed: #check_circle) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self assert: (self materialIconNamed: #check_circle) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self assert: (self materialFilledIconNamed: #check_circle) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.

self deny: (self materialOutlinedIconNamed: #check_circle) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialRoundedIconNamed: #check_circle) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialSharpIconNamed: #check_circle) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialTwoToneIconNamed: #check_circle) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialOutlinedIconNamed: #check_circle) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self deny: (self materialRoundedIconNamed: #check_circle) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self deny: (self materialSharpIconNamed: #check_circle) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self deny: (self materialTwoToneIconNamed: #check_circle) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
]

{ #category : #tests }
MaterialDesignIcons4LibraryTest >> testMaterialDesignIconNamedStyle [

self assert: (self materialIconNamed: #check_circle style: #filled) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self assert: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle filled) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self assert: (self materialIconNamed: #check_circle style: #filled) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self assert: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle filled) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.

self deny: (self materialIconNamed: #check_circle style: #outlined) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle outlined) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: #outlined) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle outlined) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.

self deny: (self materialIconNamed: #check_circle style: #rounded) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle rounded) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: #rounded) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle rounded) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.

self deny: (self materialIconNamed: #check_circle style: #sharp) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle sharp) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: #sharp) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle sharp) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.

self deny: (self materialIconNamed: #check_circle style: #twoTone) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle twoTone) identicalTo: (MaterialDesignIconsLibrary name: #check_circle) form.
self deny: (self materialIconNamed: #check_circle style: #twoTone) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
self deny: (self materialIconNamed: #check_circle style: MaterialDesignIconsStyle twoTone) bits equals: (MaterialDesignIconsLibrary name: #check_circle) form bits.
]

{ #category : #tests }
MaterialDesignIcons4LibraryTest >> testNameWithSymbolOrString [
| iconA iconB |

iconA := (MaterialDesignIconsLibrary name: 'check_circle') form.
iconB := (MaterialDesignIconsLibrary name: #'check_circle') form.
iconA := (MaterialDesignIconsLibrary name: 'check_circle') form bits.
iconB := (MaterialDesignIconsLibrary name: #'check_circle') form bits.

self deny: iconA equals: MaterialDesignIconsLibrary currentThemeIcons notFound.
self assert: iconA equals: iconB
Expand All @@ -177,8 +177,8 @@ MaterialDesignIcons4LibraryTest >> testNameWithSymbolOrString [
MaterialDesignIcons4LibraryTest >> testNotFoundIcon [

self
assert: (MaterialDesignIconsLibrary name: #test_NotExistingIcon) form
equals: MaterialDesignIconsLibrary currentThemeIcons notFound
assert: (MaterialDesignIconsLibrary name: #test_NotExistingIcon) form bits
equals: MaterialDesignIconsLibrary currentThemeIcons notFound bits
]

{ #category : #tests }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ SmockGeneralIconsLibraryTest >> testInstallEmbeddedIcon [

| form |
self
assert: (SmockTestIconsLibrary name: #myIcon) form
equals: SmockTestIconsLibrary currentThemeIcons notFound.
assert: (SmockTestIconsLibrary name: #myIcon) form bits
equals: SmockTestIconsLibrary currentThemeIcons notFound bits.

form := Form extent: 10 @ 10.
SmockTestIconsLibrary installEmbeddedIcon: form name: #myIcon.
Expand Down
4 changes: 2 additions & 2 deletions OpenSmock-Iconography-Tests/SmockIconsLibraryTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ SmockIconsLibraryTest >> testLibraryName [
SmockIconsLibraryTest >> testNotFoundIcon [

self
assert: (SmockIconsLibrary name: #test_NotFoundIcon) form
equals: SmockIconsLibrary currentThemeIcons notFound
assert: (SmockIconsLibrary name: #test_NotFoundIcon) form bits
equals: SmockIconsLibrary currentThemeIcons notFound bits
]

{ #category : #tests }
Expand Down
4 changes: 3 additions & 1 deletion OpenSmock-Iconography/SmockAbstractIconsLibrary.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ SmockAbstractIconsLibrary >> cachedForm [
form := self themeIcons iconNamed: symbol.

form ifNil:[ ^ nil ].
form bits = self themeIcons notFoundIcon bits ifTrue:[ ^ nil ].

form == self themeIcons notFound ifTrue:[ ^ nil ].
^ form
]
Expand Down Expand Up @@ -262,7 +264,7 @@ SmockAbstractIconsLibrary >> isCachedForm [
symbol := self buildSymbol.
form := self themeIcons iconNamed: symbol.

^ (form notNil and:[form ~= self themeIcons notFound])
^ (form notNil and:[form bits ~= self themeIcons notFound bits])
]

{ #category : #accessing }
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[![Pharo 11](https://img.shields.io/badge/Pharo-11-%23aac9ff.svg)](https://pharo.org/download)
[![Pharo 12](https://img.shields.io/badge/Pharo-12-%23aac9ff.svg)](https://pharo.org/download)
[![Pharo 13](https://img.shields.io/badge/Pharo-13-%23aac9ff.svg)](https://pharo.org/download)

[![License](https://img.shields.io/github/license/OpenSmock/Iconography.svg)](./LICENSE)
[![Pharo 11 CI](https://github.com/OpenSmock/Iconography/actions/workflows/Pharo11CI.yml/badge.svg)](https://github.com/OpenSmock/Iconography/actions/workflows/Pharo11CI.yml)
[![Pharo 12 CI](https://github.com/OpenSmock/Iconography/actions/workflows/Pharo12CI.yml/badge.svg)](https://github.com/OpenSmock/Iconography/actions/workflows/Pharo12CI.yml)
[![Pharo 13 CI](https://github.com/OpenSmock/Iconography/actions/workflows/Pharo13CI.yml/badge.svg)](https://github.com/OpenSmock/Iconography/actions/workflows/Pharo13CI.yml)
[![Unit tests](https://github.com/OpenSmock/Iconography/actions/workflows/CI.yml/badge.svg)](https://github.com/OpenSmock/Iconography/actions/workflows/CI.yml)

# Iconography

Expand Down
Loading