<commit_before>Class {
	#name : #RTBorderAttachPointTest,
	#superclass : #RTAttachPointTest,
	#instVars : [
		'attachPoint',
		'el'
	],
	#category : #'Roassal2-Core-Tests'
}

{ #category : #running }
RTBorderAttachPointTest >> setUp [
	super setUp.
	attachPoint := RTBorderAttachPoint new
]

{ #category : #tests }
RTBorderAttachPointTest >> testBoxBorderPoint [
	| from to via |
	from := GRectangle origin: 0 @ 0 corner: 20 @ 10.
	to := GRectangle origin: 10 @ 30 corner: 20 @ 40.
	via := GLineSegment from: from center to: to center.
	self assert: (attachPoint borderPointFrom: from to: to via: via) equals: (65 / 6) @ 10.
	self assert: (attachPoint borderPointFrom: to to: from via: via) equals: (85 / 6) @ 30
]

{ #category : #tests }
RTBorderAttachPointTest >> testEllipseBorderPoint [
	| from to via |
	from := GEllipse center: 10 @ 5 a: 5 b: 2.5.
	to := GEllipse center: 15 @ 35 a: 5 b: 5.
	via := GLineSegment from: from center to: to center.
	self assert: (attachPoint borderPointFrom: from to: to via: via) equals: (65 / 6) @ 10.
	self assert: (attachPoint borderPointFrom: to to: from via: via) equals: (85 / 6) @ 30
]

{ #category : #tests }
RTBorderAttachPointTest >> testGeometryBox [
	el := RTBox new
		width: 20;
		height: 30;
		element.<commit_msg>Removed extra (broken) test... the proper testing is/should be on Geometry package side.<commit_after>Class {
	#name : #RTBorderAttachPointTest,
	#superclass : #RTAttachPointTest,
	#instVars : [
		'attachPoint',
		'el'
	],
	#category : #'Roassal2-Core-Tests'
}

{ #category : #running }
RTBorderAttachPointTest >> setUp [
	super setUp.
	attachPoint := RTBorderAttachPoint new
]

{ #category : #tests }
RTBorderAttachPointTest >> testBoxBorderPoint [
	| from to via |
	from := GRectangle origin: 0 @ 0 corner: 20 @ 10.
	to := GRectangle origin: 10 @ 30 corner: 20 @ 40.
	via := GLineSegment from: from center to: to center.
	self assert: (attachPoint borderPointFrom: from to: to via: via) equals: (65 / 6) @ 10.
	self assert: (attachPoint borderPointFrom: to to: from via: via) equals: (85 / 6) @ 30
]

{ #category : #tests }
RTBorderAttachPointTest >> testGeometryBox [
	el := RTBox new
		width: 20;
		height: 30;
		element.
{'fraction_non_alphanumeric': 0.12831050228310503, 'fraction_numerical': 0.0365296803652968, 'mean_word_length': 4.025229357798165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4617803', 'n_tokens_mistral': 854, 'n_tokens_neox': 769, 'n_words': 246}