File tree Expand file tree Collapse file tree 5 files changed +49
-0
lines changed
Grease-Core.package/GRPlatform.class/instance
Grease-Tests-Core.package/GRPlatformTest.class/instance Expand file tree Collapse file tree 5 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ file library
2+ doSilently: aBlock
3+ " Suspend all notifications value evaluating the given block."
4+ ^ aBlock value
Original file line number Diff line number Diff line change 1+ running
2+ runCase
3+ GRPlatform current doSilently: [ super runCase ]
Original file line number Diff line number Diff line change 1+ private
2+ supportsUnicode
3+ " dynamically try to figure out whether the current dialect supports Unicode"
4+ ^ [
5+ String
6+ with: (Character value: 16r1F1F3)
7+ with: (Character value: 16r1F1F1).
8+ true
9+ ] on: Error
10+ do: [ :error | false ]
Original file line number Diff line number Diff line change 1+ tests- file library
2+ testCompileAsciiString
3+ | selector expected source |
4+
5+ self supportsUnicode ifFalse: [
6+ ^ self ].
7+
8+ selector := #stringMethod .
9+ expected := ' test ok' .
10+ source := GRPlatform current asMethodReturningString: expected named: selector.
11+ [
12+ | actual |
13+ GRPlatform current compile: source into: self class classified: ' private' .
14+ actual := self perform: selector.
15+ self assert: expected = actual
16+ ] ensure : [
17+ GRPlatform current removeSelector: #stringMethod from: self class ]
Original file line number Diff line number Diff line change 1+ tests- file library
2+ testCompileUnicodeString
3+ | selector expected source |
4+ selector := #stringMethod .
5+ expected := String
6+ with: (Character value: 16r1F1F3)
7+ with: (Character value: 16r1F1F1).
8+ source := GRPlatform current asMethodReturningString: expected named: selector.
9+ [
10+ | actual |
11+ GRPlatform current compile: source into: self class classified: ' private' .
12+ actual := self perform: selector.
13+ self assert: expected = actual
14+ ] ensure : [
15+ GRPlatform current removeSelector: #stringMethod from: self class ]
You can’t perform that action at this time.
0 commit comments