Class {
	#name : #PjObjectTest,
	#superclass : #PjBridgeTestCase,
	#category : #PharoJsCoreLibrariesTest
}

{ #category : #testing }
PjObjectTest >> testPrintString [
	self assert: [ Object new printString ] evaluatesTo: 'an Object'.
	self assert: [ PjSet new printString ] evaluatesTo: 'a PjSet'.
	self assert: [ 'hello world' printString ] evaluatesTo: 'hello world'.
	self assert: [ 123 printString ] evaluatesTo: '123'.
	self assert: [ true printString ] evaluatesTo: 'true'.
	

]

Class {
	#name : #PjObjectTest,
	#superclass : #PjBridgeTestCase,
	#category : #PharoJsCoreLibrariesTest
}

{ #category : #testing }
PjObjectTest >> testNewObjectHasNoEnumeratableKeys [
	"This is important for many JS third party libraries"
	self assertBlock: [ Object new allEnumeratableKeys isEmpty ] .

]

{ #category : #testing }
PjObjectTest >> testPrintString [
	self assert: [ Object new printString ] evaluatesTo: 'an Object'.
	self assert: [ PjSet new printString ] evaluatesTo: 'a PjSet'.
	self assert: [ 'hello world' printString ] evaluatesTo: 'hello world'.
	self assert: [ 123 printString ] evaluatesTo: '123'.
	self assert: [ true printString ] evaluatesTo: 'true'.
	

]

Test that new objects (Object new) have no enumeratable keys neitehr owned nor inherited
Test that new objects (Object new) have no enumeratable keys neitehr owned nor inherited
bouraqadi/PharoJS,bouraqadi/PharoJS,bouraqadi/PharoJS