-
Notifications
You must be signed in to change notification settings - Fork 1
better_padding_and_margin #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Nyan11
wants to merge
1
commit into
main
Choose a base branch
from
better_padding_and_margin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,17 +19,17 @@ BlocSerializationChildrenTests >> testChildren [ | |
| e3 }. | ||
|
|
||
| self test: origin on: [ :element | | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 3. | ||
| self assert: (element childAt: 1) parent equals: element. | ||
| self assert: (element childAt: 1) isFirstChild equals: true. | ||
| self assert: (element childAt: 1) isLastChild equals: false. | ||
| self assert: (element childAt: 2) parent equals: element. | ||
| self assert: (element childAt: 2) isFirstChild equals: false. | ||
| self assert: (element childAt: 2) isLastChild equals: false. | ||
| self assert: (element childAt: 3) owner equals: element. | ||
| self assert: (element childAt: 3) isFirstChild equals: false. | ||
| self assert: (element childAt: 3) isLastChild equals: true ] | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 3. | ||
| self assert: (element childAt: 1) parent equals: element. | ||
| self assert: (element childAt: 1) isFirstChild equals: true. | ||
| self assert: (element childAt: 1) isLastChild equals: false. | ||
| self assert: (element childAt: 2) parent equals: element. | ||
| self assert: (element childAt: 2) isFirstChild equals: false. | ||
| self assert: (element childAt: 2) isLastChild equals: false. | ||
| self assert: (element childAt: 3) parent equals: element. | ||
| self assert: (element childAt: 3) isFirstChild equals: false. | ||
| self assert: (element childAt: 3) isLastChild equals: true ] | ||
| ] | ||
|
|
||
| { #category : #tests } | ||
|
|
@@ -45,7 +45,7 @@ BlocSerializationChildrenTests >> testChildren1 [ | |
| background: Color blue; | ||
| yourself. | ||
| e2 := BlElement new | ||
| size: 50 @ 10; | ||
| extent: 50 @ 10; | ||
| background: Color green; | ||
| yourself. | ||
| e3 := BlElement new | ||
|
|
@@ -59,17 +59,17 @@ BlocSerializationChildrenTests >> testChildren1 [ | |
| e3 }. | ||
|
|
||
| self test: origin on: [ :element | | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 3. | ||
| self assert: (element childAt: 1) owner equals: element. | ||
| self assert: (element childAt: 1) isFirstChild equals: true. | ||
| self assert: (element childAt: 1) isLastChild equals: false. | ||
| self assert: (element childAt: 2) owner equals: element. | ||
| self assert: (element childAt: 2) isFirstChild equals: false. | ||
| self assert: (element childAt: 2) isLastChild equals: false. | ||
| self assert: (element childAt: 3) owner equals: element. | ||
| self assert: (element childAt: 3) isFirstChild equals: false. | ||
| self assert: (element childAt: 3) isLastChild equals: true ] | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 3. | ||
| self assert: (element childAt: 1) owner equals: element. | ||
| self assert: (element childAt: 1) isFirstChild equals: true. | ||
| self assert: (element childAt: 1) isLastChild equals: false. | ||
| self assert: (element childAt: 2) owner equals: element. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. owner is now parent, right? |
||
| self assert: (element childAt: 2) isFirstChild equals: false. | ||
| self assert: (element childAt: 2) isLastChild equals: false. | ||
| self assert: (element childAt: 3) owner equals: element. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. owner is now parent, right? |
||
| self assert: (element childAt: 3) isFirstChild equals: false. | ||
| self assert: (element childAt: 3) isLastChild equals: true ] | ||
| ] | ||
|
|
||
| { #category : #tests } | ||
|
|
@@ -85,7 +85,7 @@ BlocSerializationChildrenTests >> testChildren2 [ | |
| background: Color blue; | ||
| yourself. | ||
| e2 := BlElement new | ||
| size: 50 @ 10; | ||
| extent: 50 @ 10; | ||
| background: Color green; | ||
| yourself. | ||
| e3 := BlElement new | ||
|
|
@@ -99,26 +99,28 @@ BlocSerializationChildrenTests >> testChildren2 [ | |
| e3 }. | ||
|
|
||
| self test: origin on: [ :element | | ||
| self assert: element constraints horizontal resizer size equals: 300. | ||
| self assert: element constraints vertical resizer size equals: 500. | ||
| self | ||
| assert: (element childAt: 1) constraints horizontal resizer size | ||
| equals: 200. | ||
| self | ||
| assert: (element childAt: 2) constraints horizontal resizer size | ||
| equals: 50. | ||
| self | ||
| assert: (element childAt: 3) constraints horizontal resizer size | ||
| equals: 80. | ||
| self | ||
| assert: (element childAt: 1) constraints vertical resizer size | ||
| equals: 100. | ||
| self | ||
| assert: (element childAt: 2) constraints vertical resizer size | ||
| equals: 10. | ||
| self | ||
| assert: (element childAt: 3) constraints vertical resizer size | ||
| equals: 600 ] | ||
| self | ||
| assert: element constraints horizontal resizer size | ||
| equals: 300. | ||
| self assert: element constraints vertical resizer size equals: 500. | ||
| self | ||
| assert: (element childAt: 1) constraints horizontal resizer size | ||
| equals: 200. | ||
| self | ||
| assert: (element childAt: 2) constraints horizontal resizer size | ||
| equals: 50. | ||
| self | ||
| assert: (element childAt: 3) constraints horizontal resizer size | ||
| equals: 80. | ||
| self | ||
| assert: (element childAt: 1) constraints vertical resizer size | ||
| equals: 100. | ||
| self | ||
| assert: (element childAt: 2) constraints vertical resizer size | ||
| equals: 10. | ||
| self | ||
| assert: (element childAt: 3) constraints vertical resizer size | ||
| equals: 600 ] | ||
| ] | ||
|
|
||
| { #category : #tests } | ||
|
|
@@ -134,7 +136,7 @@ BlocSerializationChildrenTests >> testChildren3 [ | |
| background: Color blue; | ||
| yourself. | ||
| e2 := BlElement new | ||
| size: 50 @ 10; | ||
| extent: 50 @ 10; | ||
| background: Color green; | ||
| yourself. | ||
| e3 := BlElement new | ||
|
|
@@ -148,16 +150,16 @@ BlocSerializationChildrenTests >> testChildren3 [ | |
| e3 }. | ||
|
|
||
| self test: origin on: [ :element | | ||
| self assert: element background paint color equals: Color red. | ||
| self | ||
| assert: (element childAt: 1) background paint color | ||
| equals: Color blue. | ||
| self | ||
| assert: (element childAt: 2) background paint color | ||
| equals: Color green. | ||
| self | ||
| assert: (element childAt: 3) background paint color | ||
| equals: Color yellow ] | ||
| self assert: element background paint color equals: Color red. | ||
| self | ||
| assert: (element childAt: 1) background paint color | ||
| equals: Color blue. | ||
| self | ||
| assert: (element childAt: 2) background paint color | ||
| equals: Color green. | ||
| self | ||
| assert: (element childAt: 3) background paint color | ||
| equals: Color yellow ] | ||
| ] | ||
|
|
||
| { #category : #tests } | ||
|
|
@@ -175,17 +177,17 @@ BlocSerializationChildrenTests >> testChildrenBasic1 [ | |
| e3 }. | ||
|
|
||
| self test: origin on: [ :element | | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 3. | ||
| self assert: (element childAt: 1) parent equals: element. | ||
| self assert: (element childAt: 1) isFirstChild equals: true. | ||
| self assert: (element childAt: 1) isLastChild equals: false. | ||
| self assert: (element childAt: 2) parent equals: element. | ||
| self assert: (element childAt: 2) isFirstChild equals: false. | ||
| self assert: (element childAt: 2) isLastChild equals: false. | ||
| self assert: (element childAt: 3) owner equals: element. | ||
| self assert: (element childAt: 3) isFirstChild equals: false. | ||
| self assert: (element childAt: 3) isLastChild equals: true ] | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 3. | ||
| self assert: (element childAt: 1) parent equals: element. | ||
| self assert: (element childAt: 1) isFirstChild equals: true. | ||
| self assert: (element childAt: 1) isLastChild equals: false. | ||
| self assert: (element childAt: 2) parent equals: element. | ||
| self assert: (element childAt: 2) isFirstChild equals: false. | ||
| self assert: (element childAt: 2) isLastChild equals: false. | ||
| self assert: (element childAt: 3) parent equals: element. | ||
| self assert: (element childAt: 3) isFirstChild equals: false. | ||
| self assert: (element childAt: 3) isLastChild equals: true ] | ||
| ] | ||
|
|
||
| { #category : #tests } | ||
|
|
@@ -202,26 +204,26 @@ BlocSerializationChildrenTests >> testChildrenBasic2 [ | |
| e2 addChild: e3. | ||
|
|
||
| self test: origin on: [ :element | | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 1. | ||
|
|
||
| self assert: (element childAt: 1) parent equals: element. | ||
| self assert: (element childAt: 1) children size equals: 1. | ||
|
|
||
| self | ||
| assert: ((element childAt: 1) childAt: 1) children size | ||
| equals: 1. | ||
| self | ||
| assert: ((element childAt: 1) childAt: 1) parent | ||
| equals: (element childAt: 1). | ||
|
|
||
| self | ||
| assert: | ||
| (((element childAt: 1) childAt: 1) childAt: 1) children size | ||
| equals: 0. | ||
| self | ||
| assert: (((element childAt: 1) childAt: 1) childAt: 1) owner | ||
| equals: ((element childAt: 1) childAt: 1) ] | ||
| self assert: element parent equals: nil. | ||
| self assert: element children size equals: 1. | ||
|
|
||
| self assert: (element childAt: 1) parent equals: element. | ||
| self assert: (element childAt: 1) children size equals: 1. | ||
|
|
||
| self | ||
| assert: ((element childAt: 1) childAt: 1) children size | ||
| equals: 1. | ||
| self | ||
| assert: ((element childAt: 1) childAt: 1) parent | ||
| equals: (element childAt: 1). | ||
|
|
||
| self | ||
| assert: | ||
| (((element childAt: 1) childAt: 1) childAt: 1) children size | ||
| equals: 0. | ||
| self | ||
| assert: (((element childAt: 1) childAt: 1) childAt: 1) parent | ||
| equals: ((element childAt: 1) childAt: 1) ] | ||
| ] | ||
|
|
||
| { #category : #tests } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
owneris nowparent, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is a copy paste from old test in Bloc.
It need to be updated