diff --git a/.github/workflows/Pharo11CI.yml b/.github/workflows/CI.yml similarity index 55% rename from .github/workflows/Pharo11CI.yml rename to .github/workflows/CI.yml index a5070c7..7e36870 100644 --- a/.github/workflows/Pharo11CI.yml +++ b/.github/workflows/CI.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/Pharo12CI.yml b/.github/workflows/Pharo12CI.yml deleted file mode 100644 index df0b184..0000000 --- a/.github/workflows/Pharo12CI.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: 'Pharo 12 CI' - -on: - push: - branches: - - 'master' - pull_request: - types: [assigned, opened, synchronize, reopened] - -jobs: - build: - strategy: - matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] - smalltalk: [ Pharo64-12 ] - runs-on: ${{ matrix.os }} - name: ${{ matrix.smalltalk }} on ${{ 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 - run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }} - shell: bash - timeout-minutes: 10 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/Pharo13CI.yml b/.github/workflows/Pharo13CI.yml deleted file mode 100644 index 6e58c42..0000000 --- a/.github/workflows/Pharo13CI.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: 'Pharo 13 CI' - -on: - push: - branches: - - 'master' - pull_request: - types: [assigned, opened, synchronize, reopened] - -jobs: - build: - strategy: - matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] - smalltalk: [ Pharo64-13 ] - runs-on: ${{ matrix.os }} - name: ${{ matrix.smalltalk }} on ${{ 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 - run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }} - shell: bash - timeout-minutes: 10 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.smalltalk.ston b/.smalltalkci.default.ston similarity index 100% rename from .smalltalk.ston rename to .smalltalkci.default.ston diff --git a/OpenSmock-Iconography-Tests/AntDesignIconsLibraryTest.class.st b/OpenSmock-Iconography-Tests/AntDesignIconsLibraryTest.class.st index c386c72..10ed175 100644 --- a/OpenSmock-Iconography-Tests/AntDesignIconsLibraryTest.class.st +++ b/OpenSmock-Iconography-Tests/AntDesignIconsLibraryTest.class.st @@ -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 } @@ -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 } @@ -175,10 +177,10 @@ 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. ] @@ -186,8 +188,8 @@ AntDesignIconsLibraryTest >> testNameWithSymbolOrString [ 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 } diff --git a/OpenSmock-Iconography-Tests/MaterialDesignIcons4LibraryTest.class.st b/OpenSmock-Iconography-Tests/MaterialDesignIcons4LibraryTest.class.st index 09abdb6..aa1846c 100644 --- a/OpenSmock-Iconography-Tests/MaterialDesignIcons4LibraryTest.class.st +++ b/OpenSmock-Iconography-Tests/MaterialDesignIcons4LibraryTest.class.st @@ -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 } @@ -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 @@ -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 } diff --git a/OpenSmock-Iconography-Tests/SmockGeneralIconsLibraryTest.class.st b/OpenSmock-Iconography-Tests/SmockGeneralIconsLibraryTest.class.st index e81052f..40f8b84 100644 --- a/OpenSmock-Iconography-Tests/SmockGeneralIconsLibraryTest.class.st +++ b/OpenSmock-Iconography-Tests/SmockGeneralIconsLibraryTest.class.st @@ -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. diff --git a/OpenSmock-Iconography-Tests/SmockIconsLibraryTest.class.st b/OpenSmock-Iconography-Tests/SmockIconsLibraryTest.class.st index 8b19ebd..18554db 100644 --- a/OpenSmock-Iconography-Tests/SmockIconsLibraryTest.class.st +++ b/OpenSmock-Iconography-Tests/SmockIconsLibraryTest.class.st @@ -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 } diff --git a/OpenSmock-Iconography/SmockAbstractIconsLibrary.class.st b/OpenSmock-Iconography/SmockAbstractIconsLibrary.class.st index 7f7a91e..d944914 100644 --- a/OpenSmock-Iconography/SmockAbstractIconsLibrary.class.st +++ b/OpenSmock-Iconography/SmockAbstractIconsLibrary.class.st @@ -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 ] @@ -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 } diff --git a/README.md b/README.md index a3f6c56..059fbe5 100644 --- a/README.md +++ b/README.md @@ -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