├── src ├── Koans-Chapters.package │ ├── KoanBonsai.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── width.st │ │ │ ├── height.st │ │ │ ├── color.st │ │ │ ├── initialize.st │ │ │ ├── fruits.st │ │ │ └── height..st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanLotus.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── initialize.st │ │ │ ├── publicInstanceVariable.st │ │ │ └── publicInstanceVariable..st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanAiderBonsai.class │ │ ├── README.md │ │ ├── instance │ │ │ └── fruits.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanCrystalDice.class │ │ ├── README.md │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMapleBonsai.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── color.st │ │ │ ├── fruits.st │ │ │ └── width.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMetaBonsai.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── fruit1.st │ │ │ ├── fruit2.st │ │ │ ├── fruit3.st │ │ │ └── fruit4.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── monticello.meta │ │ ├── initializers.st │ │ └── categories.st │ ├── properties.json │ ├── KoanBambooBonsai.class │ │ ├── README.md │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanAboutAsserts.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── koan01assertTruthSuccess.st │ │ ├── instance │ │ │ ├── test01assertTruth.st │ │ │ ├── test02assertWithDescription.st │ │ │ ├── test04aBetterWayOfAssertingEquality.st │ │ │ ├── test03assertReality.st │ │ │ └── test05fillInValues.st │ │ ├── README.md │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutBlocks.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── requirements.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test01whatIsABlock.st │ │ │ ├── test04blocksCanBeStored.st │ │ │ ├── test02aBlockCanBeExecuted.st │ │ │ ├── test06blocksWithTempVariables.st │ │ │ ├── test07blocksAndConditions.st │ │ │ ├── test05passParametersToBlocksButPassTheRight.st │ │ │ └── test03theLastStatementReturns.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutClasses.class │ │ ├── class │ │ │ ├── priority.st │ │ │ ├── requiredClasses.st │ │ │ ├── requirements.st │ │ │ ├── koan05whoIAmTellsYouClassSuccess.st │ │ │ └── koan06classesUnderstandCanUnderstandSuccess.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test01createAnInstanceWithNew.st │ │ │ ├── test04useGettersAndSetters.st │ │ │ ├── test03theTaleOfNewAndBasicNew.st │ │ │ ├── test06classesUnderstandCanUnderstand.st │ │ │ ├── test05whoIAmTellsYouClass.st │ │ │ └── test02instanceVariablesAreEncapsulated.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutMeta.class │ │ ├── class │ │ │ ├── priority.st │ │ │ ├── requirements.st │ │ │ └── requiredClasses.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test01callAMethodOrLeaveAMessage.st │ │ │ ├── test02sendAMessageWithAttachedArguments.st │ │ │ ├── test05classesHaveAccessToHierachy.st │ │ │ ├── test04classesAreObjectsAndHaveClassesHaveClasses.st │ │ │ └── test03casesByMessageNames.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutNil.class │ │ ├── class │ │ │ ├── priority.st │ │ │ ├── requirements.st │ │ │ ├── countAllInstancesOfNil.st │ │ │ └── numberOfAllInstancesOfNil.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test02variablesAreInitializedToNil.st │ │ │ ├── test01thereIsOnlyOneNil.st │ │ │ └── test03nilIsJustAnotherObject.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutObjects.class │ │ ├── class │ │ │ ├── priority.st │ │ │ ├── requirements.st │ │ │ ├── koan07useCascadesToNotRepeatSuccess.st │ │ │ ├── koan08useCascadesToNotRepeatButBeCareful1Success.st │ │ │ └── koan09useCascadesToNotRepeatButBeCareful2Success.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test06copyObjectsWithNewFrom.st │ │ │ ├── test04everyObjectHasADifferentId.st │ │ │ ├── test07useCascadesToNotRepeat.st │ │ │ ├── test05butNotSmallIntegers.st │ │ │ ├── test01everythingIsAnObject.st │ │ │ ├── test08useCascadesToNotRepeatButBeCareful1.st │ │ │ ├── test09useCascadesToNotRepeatButBeCareful2.st │ │ │ ├── test02everyObjectHasAnId.st │ │ │ ├── test10yourselfIsTheObjectItself.st │ │ │ └── test03compareAndCompar.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutCollections.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── requirements.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test03arraysAreImmutable.st │ │ │ ├── test05set.st │ │ │ ├── test02collectionsStartAtFirst.st │ │ │ ├── test06setsBiggerBrotherTheBag.st │ │ │ ├── test04orderedCollection.st │ │ │ ├── test07dictionary.st │ │ │ ├── test09sortedCollection.st │ │ │ ├── test08identityDictionaryIsRigorous.st │ │ │ └── test01collectionsCanComeInDifferentFlavours.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutDiceProject.class │ │ ├── class │ │ │ ├── priority.st │ │ │ ├── requiredClasses.st │ │ │ └── requirements.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test05youCanRollDifferentNumbersOfDice.st │ │ │ ├── test03diceValuesDoNotChangeUnlessExplicitlyRolled.st │ │ │ ├── test04diceValuesShouldChangeBetweenRolls.st │ │ │ ├── test01AboutDiceProject.st │ │ │ └── test02rollingTheDiceReturnsASetOfIntegersInsideTheRange.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutInheritance.class │ │ ├── class │ │ │ ├── priority.st │ │ │ ├── requirements.st │ │ │ └── requiredClasses.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test04askSuperWithSuper.st │ │ │ ├── test03abstractMethodsAreSubclassResponsibility.st │ │ │ ├── test02methodInheritanceAndOverridingExist.st │ │ │ └── test01inheritanceVariableInheritanceExists.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutStrings.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── requirements.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test02escaping.st │ │ │ ├── test04aNewLineIsAnewline.st │ │ │ ├── test06stringsAreNotUnique.st │ │ │ ├── test05createStringsWithFormat.st │ │ │ ├── test01stringsAreCollections.st │ │ │ └── test03concatenationConnectsHelloAndWorld.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutSymbols.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── requirements.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test09symbolsCanBeDynamicallyCreated.st │ │ │ ├── test01symbolsAreSymbols.st │ │ │ ├── test08symbolsAreImmutable.st │ │ │ ├── test05symbolsCanBeMadeFromStrings.st │ │ │ ├── test06symbolsWithSpacesCanBeMade.st │ │ │ ├── test07symbolsAreSpecialStrings.st │ │ │ ├── test03identicalSymbolsAreASingleIdenticalObject.st │ │ │ ├── test02symbolsCanBeCompared.st │ │ │ └── test04methodNamesBecomeSymbols.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutTrueAndFalse.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── requirements.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test04alsoNotAndImplies.st │ │ │ ├── test02andIsAMessageOfBoolean.st │ │ │ ├── test03orIsAMessageOfBoolean.st │ │ │ └── test01trueAndFalseAreObjects.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutControlStatements.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── requirements.st │ │ ├── README.md │ │ ├── instance │ │ │ ├── test09loopExecution.st │ │ │ ├── test07nil.st │ │ │ ├── test04conditionalExecutionWithExpressions.st │ │ │ ├── test05statementsInAssignments.st │ │ │ ├── test03conditionalExecution.st │ │ │ ├── test06implication.st │ │ │ ├── test08loopsOperateOnBlocks.st │ │ │ ├── test02statementsTakeBlocks.st │ │ │ └── test01statementsAreMethodsOfBooleanClass.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanAboutCollectionProtocol.class │ │ ├── class │ │ │ ├── priority.st │ │ │ └── requirements.st │ │ ├── instance │ │ │ ├── test01includes.st │ │ │ ├── test07detect.st │ │ │ ├── test04select.st │ │ │ ├── test03allSatisfy.st │ │ │ ├── test09collect.st │ │ │ ├── test11sizeAndCount.st │ │ │ ├── test05reject.st │ │ │ ├── test02anySatisfy.st │ │ │ ├── test08detectIfNone.st │ │ │ ├── test06mathStuff.st │ │ │ ├── test13specialIterators.st │ │ │ ├── test10inject.st │ │ │ └── test12do.st │ │ ├── README.md │ │ ├── properties.json │ │ └── methodProperties.json │ ├── .filetree │ └── .squot-contents ├── Koans-Core.package │ ├── properties.json │ ├── monticello.meta │ │ ├── initializers.st │ │ └── categories.st │ ├── KoanChapter.class │ │ ├── class │ │ │ ├── isMock.st │ │ │ ├── priority.st │ │ │ ├── requirements.st │ │ │ ├── requiredClasses.st │ │ │ ├── icon.st │ │ │ ├── isProject.st │ │ │ ├── methodsInChapter.st │ │ │ ├── requiredClassesNames.st │ │ │ ├── koansInChapter.st │ │ │ ├── resetKoansInChapter.st │ │ │ ├── browseRequiredClasses.st │ │ │ └── allChapters.st │ │ ├── instance │ │ │ ├── initialize.st │ │ │ └── debugAsFailure.st │ │ ├── README.md │ │ ├── properties.json │ │ └── methodProperties.json │ ├── Koans.class │ │ ├── class │ │ │ ├── open.st │ │ │ └── initialize.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanStep.class │ │ ├── instance │ │ │ ├── chapter.st │ │ │ ├── selector.st │ │ │ ├── debug.st │ │ │ ├── isPassing.st │ │ │ ├── oldTestResult.st │ │ │ ├── openEditor.st │ │ │ ├── attempts..st │ │ │ ├── chapter..st │ │ │ ├── isErroring.st │ │ │ ├── isFailing.st │ │ │ ├── reset.st │ │ │ ├── selector..st │ │ │ ├── attempts.st │ │ │ ├── emptySuccessMessage.st │ │ │ ├── oldCompiledMethod.st │ │ │ ├── hash.st │ │ │ ├── testCase.st │ │ │ ├── oldTestResult..st │ │ │ ├── printOn..st │ │ │ ├── changeRecords.st │ │ │ ├── compiledMethod.st │ │ │ ├── oldCompiledMethod..st │ │ │ ├── saveTestResult..st │ │ │ ├── hasChanged.st │ │ │ ├── currentSuccessMessageSelector.st │ │ │ ├── testResult.st │ │ │ ├── createTestSuite.st │ │ │ ├── ^equals.st │ │ │ ├── successMessage.st │ │ │ ├── icon.st │ │ │ └── newTestResult.st │ │ ├── class │ │ │ ├── on.selector..st │ │ │ └── allSteps.st │ │ ├── README.md │ │ └── properties.json │ ├── KoanEditor.class │ │ ├── instance │ │ │ ├── browser.st │ │ │ ├── test.st │ │ │ ├── openedKoan.st │ │ │ ├── debugKoan.st │ │ │ ├── browser..st │ │ │ ├── testOnSave.st │ │ │ ├── closeOpenedWindow.st │ │ │ ├── openedKoan..st │ │ │ ├── saveAndTest.st │ │ │ ├── saveChanges.st │ │ │ ├── defaultSuccessMessage.st │ │ │ ├── koanList.st │ │ │ ├── openedChapter.st │ │ │ ├── isNextButtonEnabled.st │ │ │ ├── windowColorToUse.st │ │ │ ├── browseProject.st │ │ │ ├── testOnSave..st │ │ │ ├── isPreviousButtonEnabled.st │ │ │ ├── statusBarHeight.st │ │ │ ├── isFirstKoanInChapter.st │ │ │ ├── isLastKoanInChapter.st │ │ │ ├── resetKoan.st │ │ │ ├── isBrowseProjectButtonEnabled.st │ │ │ ├── setBrowserTo..st │ │ │ ├── successMessage.st │ │ │ ├── statusBarTextColor.st │ │ │ ├── updateButtonState.st │ │ │ ├── toggleTestOnSave.st │ │ │ ├── disableTestOnSave.st │ │ │ ├── openKoan..st │ │ │ ├── initialize.st │ │ │ ├── toggleTestOnSaveLabel.st │ │ │ ├── updateStatusBar.st │ │ │ ├── enableTestOnSave.st │ │ │ ├── addModelItemsToWindowMenu..st │ │ │ ├── nextKoan.st │ │ │ ├── previousKoan.st │ │ │ ├── statusBarText.st │ │ │ ├── statusBarBackgroundColor.st │ │ │ ├── failureMessage.st │ │ │ ├── buildBrowserWith..st │ │ │ ├── onSave..st │ │ │ ├── buildWith..st │ │ │ ├── errorMessage.st │ │ │ ├── windowTitle.st │ │ │ ├── changeToSelectionView.st │ │ │ ├── buildStatusBarWith..st │ │ │ ├── buttonSpecs.st │ │ │ └── buildButtonBarWith..st │ │ ├── class │ │ │ ├── defaultExtent.st │ │ │ ├── testOnSave.st │ │ │ ├── defaultWindowTitle.st │ │ │ ├── testOnSave..st │ │ │ ├── buttonHeight.st │ │ │ ├── openOn..st │ │ │ └── newOnKoan..st │ │ ├── README.md │ │ └── properties.json │ ├── KoanBrowser.class │ │ ├── class │ │ │ ├── defaultLabel.st │ │ │ ├── defaultExtent.st │ │ │ └── open.st │ │ ├── instance │ │ │ ├── chapterList.st │ │ │ ├── labelString.st │ │ │ ├── selectedKoan.st │ │ │ ├── closeOpenedWindow.st │ │ │ ├── selectedChapter.st │ │ │ ├── koanIconAt..st │ │ │ ├── selectKoan..st │ │ │ ├── windowColorToUse.st │ │ │ ├── browseProject.st │ │ │ ├── chapterDescriptionFor..st │ │ │ ├── chapterIconAt..st │ │ │ ├── chapterTooltipFor..st │ │ │ ├── koanList.st │ │ │ ├── isProjectChapter.st │ │ │ ├── selectedKoan..st │ │ │ ├── addModelItemsToWindowMenu..st │ │ │ ├── welcomeMessage.st │ │ │ ├── descriptionBoxContent.st │ │ │ ├── selectedChapter..st │ │ │ ├── selectChapter..st │ │ │ ├── resetAllKoans.st │ │ │ ├── tooltipFor..st │ │ │ ├── buildKoanListWith..st │ │ │ ├── buildWith..st │ │ │ ├── changeToEditorViewOn..st │ │ │ ├── buildBrowseButtonWith..st │ │ │ ├── buildChapterListWith..st │ │ │ └── buildDescriptionBoxWith..st │ │ ├── README.md │ │ └── properties.json │ ├── KoanTestResult.class │ │ ├── instance │ │ │ ├── exceptions.st │ │ │ ├── creationTime.st │ │ │ ├── expirationTime.st │ │ │ ├── creationTime..st │ │ │ ├── exceptionType.st │ │ │ ├── exceptions..st │ │ │ ├── firstException.st │ │ │ ├── testSource.st │ │ │ ├── exceptionMessage.st │ │ │ ├── exceptionContext.st │ │ │ ├── isExpired.st │ │ │ ├── exceptionLine.st │ │ │ ├── initialize.st │ │ │ ├── lineNumberOfException.st │ │ │ ├── sourceRangeOfException.st │ │ │ ├── testContext.st │ │ │ ├── storeException.for..st │ │ │ └── runCase..st │ │ ├── README.md │ │ ├── properties.json │ │ └── methodProperties.json │ ├── .filetree │ └── .squot-contents ├── Koans-Tests.package │ ├── KoanMockCase.class │ │ ├── README.md │ │ ├── class │ │ │ ├── isMock.st │ │ │ └── resetToState.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockDebug.class │ │ ├── README.md │ │ ├── class │ │ │ ├── wasDebugged.st │ │ │ └── wasDebugged..st │ │ ├── instance │ │ │ ├── debugAsFailure.st │ │ │ ├── setUp.st │ │ │ ├── tearDown.st │ │ │ └── test01.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanMockEmpty.class │ │ ├── README.md │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockError.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── testFailure.st │ │ │ ├── testSuccess.st │ │ │ ├── testUntested.st │ │ │ ├── testErrorMessage.st │ │ │ └── testError.st │ │ ├── class │ │ │ └── resetToState.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanStepTests.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── testErroringKoanIsErroringExclusively.st │ │ │ ├── testFailingKoanIsFailingExclusively.st │ │ │ ├── testPassingKoanIsPassingExclusively.st │ │ │ ├── testAttemptsIncreaseWithEachTest.st │ │ │ └── testReset.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanUITests.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── newMorphs.st │ │ │ ├── tearDown.st │ │ │ ├── clearHistory..st │ │ │ ├── clearHistory.for..st │ │ │ ├── testNoneIcon.st │ │ │ ├── setUp.st │ │ │ ├── testChangeToSelectionViewClosesOwnWindow.st │ │ │ ├── testChangeToSelectionViewOpensAWindowWithAKoanBrowserAsModel.st │ │ │ ├── testDebuggerIsOpenedWhenDebugButtonIsClicked.st │ │ │ ├── testChangeToEditorViewClosesOwnWindow.st │ │ │ ├── testErrorIcon.st │ │ │ ├── testPassIcon.st │ │ │ ├── testFailIcon.st │ │ │ └── testChangeToEditorViewOpensAWindowWithAKoanEditorAsModel.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoansTests.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── removeKoansWindows.st │ │ │ ├── testWorldMenu.st │ │ │ └── testWindowCreation.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── properties.json │ ├── KoanBrowserTests.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── setUp.st │ │ │ ├── testChapterListIsNotEmpty.st │ │ │ ├── testChapterTooltipNotNil.st │ │ │ ├── testKoanListIsNotNilWhenNoChapterSelected.st │ │ │ ├── testBrowseButtonDisabledForNormalChapter.st │ │ │ ├── testBuildWithReturnsWindow.st │ │ │ ├── testBrowseButtonEnabledForProjectChapter.st │ │ │ ├── testChapterListContainsChapters.st │ │ │ ├── testChapterTooltip.st │ │ │ ├── testBuildKoanListWithReturnsSpec.st │ │ │ ├── testBuildBrowseButtonWithReturnsSpec.st │ │ │ ├── testBuildChapterListWithReturnsSpec.st │ │ │ ├── testChapterListOrderedByPriority.st │ │ │ └── testBrowseButtonOpensCorrectClasses.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanChapterTests.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── testKoansInChapterAreKoanSteps.st │ │ │ ├── testIsProjectReturnsBoolean.st │ │ │ ├── testKoansInChapterContainsCorrectNumberOfKoans.st │ │ │ ├── testChapterColorSystem.st │ │ │ ├── testChapterColor.st │ │ │ ├── testRequiredClassesAreClasses.st │ │ │ └── correctPairs.st │ │ ├── properties.json │ │ └── methodProperties.json │ ├── KoanEditorTests.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── testSuccessStatusBar.st │ │ │ ├── testBrowseProjectButtonIsDisabled.st │ │ │ ├── testNextJumpsToNextKoan.st │ │ │ ├── testWindowTitleIfOpenedKoanIsNil.st │ │ │ ├── setUp.st │ │ │ ├── testPreviousJumpsToPreviousKoan.st │ │ │ ├── testBuildWithReturnsWindow.st │ │ │ ├── testNextButtonBecomesDisabled.st │ │ │ ├── testNextStopsAtChapterBoundary.st │ │ │ ├── testBuildBrowserWithReturnsSpec.st │ │ │ ├── testBuildButtonBarWithReturnsSpec.st │ │ │ ├── testBuildStatusBarWithReturnsSpec.st │ │ │ ├── testNextButtonBecomesEnabled.st │ │ │ ├── testPreviousStopsAtChapterBoundary.st │ │ │ ├── testWindowTitleContainsKoan.st │ │ │ ├── testErrorStatusBar.st │ │ │ ├── testFailureStatusBar.st │ │ │ ├── testBrowseProjectButtonIsEnabled.st │ │ │ ├── testPreviousButtonBecomesDisabled.st │ │ │ ├── testPreviousButtonBecomesEnabled.st │ │ │ └── testBrowseProjectButtonOpensBrowserOnCorrectClasses.st │ │ └── properties.json │ ├── KoanMockFailure.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── testFailure.st │ │ │ ├── testSuccess.st │ │ │ └── testUntested.st │ │ ├── class │ │ │ └── resetToState.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockProject.class │ │ ├── README.md │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockSuccess.class │ │ ├── README.md │ │ ├── instance │ │ │ └── testSuccess.st │ │ ├── class │ │ │ └── resetToState.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockUnchanged.class │ │ ├── README.md │ │ ├── instance │ │ │ └── testUntested.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockVersions.class │ │ ├── README.md │ │ ├── instance │ │ │ └── testWithManyDifferentVersions.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── monticello.meta │ │ ├── initializers.st │ │ └── categories.st │ ├── KoanMockPartialSuccess.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── testSuccess.st │ │ │ └── testUntested.st │ │ ├── class │ │ │ └── resetToState.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockProjectChapter.class │ │ ├── README.md │ │ ├── instance │ │ │ └── testNothing.st │ │ ├── class │ │ │ └── requiredClasses.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanMockRequirements.class │ │ ├── README.md │ │ ├── instance │ │ │ └── testSuccess.st │ │ ├── class │ │ │ └── requirements.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── KoanTestResultTests.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── testExceptionType.st │ │ │ ├── testExceptionLine.st │ │ │ ├── testExceptionMessage.st │ │ │ └── testLineNumberForExceptions.st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── .filetree │ └── .squot-contents ├── BaselineOfKoans.package │ ├── properties.json │ ├── BaselineOfKoans.class │ │ ├── README.md │ │ ├── instance │ │ │ ├── projectClass.st │ │ │ └── baseline..st │ │ ├── methodProperties.json │ │ └── properties.json │ ├── monticello.meta │ │ ├── initializers.st │ │ └── categories.st │ ├── .filetree │ └── .squot-contents └── .filetree ├── images ├── editor.png ├── redBar.png ├── appsMenu.png ├── browser.png ├── greenBar.png ├── yellowBar.png ├── windowMenu.png └── browseProject.png ├── .squot ├── .gitignore ├── .smalltalk.ston └── .github └── workflows └── main.yml /src/Koans-Chapters.package/KoanBonsai.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanLotus.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Core.package/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockCase.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockEmpty.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoansTests.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAiderBonsai.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanCrystalDice.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMapleBonsai.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMetaBonsai.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/monticello.meta/initializers.st: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /src/Koans-Core.package/monticello.meta/initializers.st: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockFailure.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProject.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockSuccess.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockUnchanged.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockVersions.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/monticello.meta/initializers.st: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/BaselineOfKoans.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/monticello.meta/initializers.st: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBambooBonsai.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockPartialSuccess.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProjectChapter.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockRequirements.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanTestResultTests.class/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/.filetree: -------------------------------------------------------------------------------- 1 | {"propertyFileExtension" : ".json", 2 | "packageExtension" : ".package" } -------------------------------------------------------------------------------- /images/editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/editor.png -------------------------------------------------------------------------------- /images/redBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/redBar.png -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/isMock.st: -------------------------------------------------------------------------------- 1 | testing 2 | isMock 3 | 4 | ^ false -------------------------------------------------------------------------------- /src/Koans-Core.package/Koans.class/class/open.st: -------------------------------------------------------------------------------- 1 | running 2 | open 3 | 4 | ^ KoanBrowser open -------------------------------------------------------------------------------- /images/appsMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/appsMenu.png -------------------------------------------------------------------------------- /images/browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/browser.png -------------------------------------------------------------------------------- /images/greenBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/greenBar.png -------------------------------------------------------------------------------- /images/yellowBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/yellowBar.png -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/instance/width.st: -------------------------------------------------------------------------------- 1 | accessing 2 | width 3 | 4 | ^ 4 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 0 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/chapter.st: -------------------------------------------------------------------------------- 1 | accessing 2 | chapter 3 | 4 | ^ chapter -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockCase.class/class/isMock.st: -------------------------------------------------------------------------------- 1 | accessing 2 | isMock 3 | 4 | ^ true -------------------------------------------------------------------------------- /images/windowMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/windowMenu.png -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 0 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 6 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 2 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 25 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 5 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 1 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/instance/height.st: -------------------------------------------------------------------------------- 1 | accessing 2 | height 3 | 4 | ^ height -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {} -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/browser.st: -------------------------------------------------------------------------------- 1 | accessing 2 | browser 3 | 4 | ^ browser -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/test.st: -------------------------------------------------------------------------------- 1 | test 2 | test 3 | 4 | self updateStatusBar -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/selector.st: -------------------------------------------------------------------------------- 1 | accessing 2 | selector 3 | 4 | ^ selector -------------------------------------------------------------------------------- /src/Koans-Core.package/monticello.meta/categories.st: -------------------------------------------------------------------------------- 1 | SystemOrganization addCategory: #'Koans-Core'! 2 | -------------------------------------------------------------------------------- /images/browseProject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpi-swa-teaching/Koans/HEAD/images/browseProject.png -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 7 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 30 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 14 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 10 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 11 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 4 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAiderBonsai.class/instance/fruits.st: -------------------------------------------------------------------------------- 1 | accessing 2 | fruits 3 | 4 | ^ 'cones' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/instance/color.st: -------------------------------------------------------------------------------- 1 | accessing 2 | color 3 | 4 | ^ Color green -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMapleBonsai.class/instance/color.st: -------------------------------------------------------------------------------- 1 | accessing 2 | color 3 | 4 | ^ Color red -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMetaBonsai.class/instance/fruit1.st: -------------------------------------------------------------------------------- 1 | accessing 2 | fruit1 3 | 4 | ^ 'fruit 1' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMetaBonsai.class/instance/fruit2.st: -------------------------------------------------------------------------------- 1 | accessing 2 | fruit2 3 | 4 | ^ 'fruit 2' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMetaBonsai.class/instance/fruit3.st: -------------------------------------------------------------------------------- 1 | accessing 2 | fruit3 3 | 4 | ^ 'fruit 3' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMetaBonsai.class/instance/fruit4.st: -------------------------------------------------------------------------------- 1 | accessing 2 | fruit4 3 | 4 | ^ 'fruit 4' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/class/defaultLabel.st: -------------------------------------------------------------------------------- 1 | constants 2 | defaultLabel 3 | 4 | ^ 'Koans' -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/monticello.meta/categories.st: -------------------------------------------------------------------------------- 1 | SystemOrganization addCategory: #BaselineOfKoans! 2 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 9 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMapleBonsai.class/instance/fruits.st: -------------------------------------------------------------------------------- 1 | accessing 2 | fruits 3 | 4 | ^ 'maple syrup' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMapleBonsai.class/instance/width.st: -------------------------------------------------------------------------------- 1 | accessing 2 | width 3 | 4 | ^ super width + 5 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/class/defaultExtent.st: -------------------------------------------------------------------------------- 1 | constants 2 | defaultExtent 3 | 4 | ^ 670@500 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/requiredClasses.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requiredClasses 3 | 4 | ^ {} -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/class/defaultExtent.st: -------------------------------------------------------------------------------- 1 | constants 2 | defaultExtent 3 | 4 | ^ 670@500 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/openedKoan.st: -------------------------------------------------------------------------------- 1 | accessing 2 | openedKoan 3 | 4 | ^ openedKoan -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/debug.st: -------------------------------------------------------------------------------- 1 | debugging 2 | debug 3 | 4 | self testCase debugAsFailure -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/exceptions.st: -------------------------------------------------------------------------------- 1 | accessing 2 | exceptions 3 | 4 | ^ exceptions -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/class/wasDebugged.st: -------------------------------------------------------------------------------- 1 | accessing 2 | wasDebugged 3 | 4 | ^ WasDebugged -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/class/priority.st: -------------------------------------------------------------------------------- 1 | accessing 2 | priority 3 | 4 | ^ 8 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you about nil and its natural habitat. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/instance/initialize.st: -------------------------------------------------------------------------------- 1 | accessing 2 | initialize 3 | 4 | self height: 0 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/chapterList.st: -------------------------------------------------------------------------------- 1 | ui 2 | chapterList 3 | 4 | ^ KoanChapter allChapters -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/labelString.st: -------------------------------------------------------------------------------- 1 | ui 2 | labelString 3 | 4 | ^ self class defaultLabel -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/selectedKoan.st: -------------------------------------------------------------------------------- 1 | accessing 2 | selectedKoan 3 | 4 | ^ selectedKoan -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/icon.st: -------------------------------------------------------------------------------- 1 | sunit 2 | icon 3 | 4 | ^ ToolIcons iconNamed: self toolIcon -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/debugKoan.st: -------------------------------------------------------------------------------- 1 | actions 2 | debugKoan 3 | 4 | self openedKoan debug -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/isPassing.st: -------------------------------------------------------------------------------- 1 | testing 2 | isPassing 3 | 4 | ^ self testResult hasPassed -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/oldTestResult.st: -------------------------------------------------------------------------------- 1 | accessing 2 | oldTestResult 3 | 4 | ^ oldTestResult -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/openEditor.st: -------------------------------------------------------------------------------- 1 | editing 2 | openEditor 3 | 4 | ^ KoanEditor openOn: self -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/creationTime.st: -------------------------------------------------------------------------------- 1 | accessing 2 | creationTime 3 | ^ creationTime -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/expirationTime.st: -------------------------------------------------------------------------------- 1 | accessing 2 | expirationTime 3 | 4 | ^ 2000 -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockCase.class/class/resetToState.st: -------------------------------------------------------------------------------- 1 | accessing 2 | resetToState 3 | 4 | self resetHistory -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/instance/fruits.st: -------------------------------------------------------------------------------- 1 | accessing 2 | fruits 3 | 4 | self subclassResponsibility -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/instance/height..st: -------------------------------------------------------------------------------- 1 | accessing 2 | height: anObject 3 | 4 | height := anObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/class/open.st: -------------------------------------------------------------------------------- 1 | instance creation 2 | open 3 | 4 | ^ ToolBuilder open: self new -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/isProject.st: -------------------------------------------------------------------------------- 1 | testing 2 | isProject 3 | 4 | ^ self requiredClasses notEmpty -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/class/testOnSave.st: -------------------------------------------------------------------------------- 1 | constants 2 | testOnSave 3 | 4 | ^ TestOnSave ifNil: [true] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/browser..st: -------------------------------------------------------------------------------- 1 | accessing 2 | browser: anObject 3 | 4 | browser := anObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/testOnSave.st: -------------------------------------------------------------------------------- 1 | accessing 2 | testOnSave 3 | 4 | ^ self class testOnSave -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/attempts..st: -------------------------------------------------------------------------------- 1 | accessing 2 | attempts: anObject 3 | 4 | attempts := anObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/chapter..st: -------------------------------------------------------------------------------- 1 | accessing 2 | chapter: anObject 3 | 4 | chapter := anObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/isErroring.st: -------------------------------------------------------------------------------- 1 | testing 2 | isErroring 3 | 4 | ^ self testResult hasErrors -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/isFailing.st: -------------------------------------------------------------------------------- 1 | testing 2 | isFailing 3 | 4 | ^ self testResult hasFailures -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/reset.st: -------------------------------------------------------------------------------- 1 | resetting 2 | reset 3 | 4 | self changeRecords last fileIn 5 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/selector..st: -------------------------------------------------------------------------------- 1 | accessing 2 | selector: anObject 3 | 4 | selector := anObject -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockUnchanged.class/instance/testUntested.st: -------------------------------------------------------------------------------- 1 | tests 2 | testUntested 3 | 4 | self assert: false -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutAsserts} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/class/requiredClasses.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requiredClasses 3 | 4 | ^ {KoanLotus} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutAsserts} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutSymbols} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutAsserts} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutStrings} -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/closeOpenedWindow.st: -------------------------------------------------------------------------------- 1 | ui 2 | closeOpenedWindow 3 | 4 | self changed: #close -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/class/defaultWindowTitle.st: -------------------------------------------------------------------------------- 1 | constants 2 | defaultWindowTitle 3 | 4 | ^ 'Koan Editor' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/class/testOnSave..st: -------------------------------------------------------------------------------- 1 | constants 2 | testOnSave: aBoolean 3 | 4 | TestOnSave := aBoolean -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/closeOpenedWindow.st: -------------------------------------------------------------------------------- 1 | ui 2 | closeOpenedWindow 3 | 4 | self changed: #close -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/openedKoan..st: -------------------------------------------------------------------------------- 1 | accessing 2 | openedKoan: aKoan 3 | 4 | openedKoan := aKoan -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/saveAndTest.st: -------------------------------------------------------------------------------- 1 | test 2 | saveAndTest 3 | 4 | self saveChanges. 5 | self test -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/saveChanges.st: -------------------------------------------------------------------------------- 1 | ui 2 | saveChanges 3 | 4 | self browser changed: #acceptChanges -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/attempts.st: -------------------------------------------------------------------------------- 1 | accessing 2 | attempts 3 | 4 | ^ attempts ifNil: [attempts := 0] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/emptySuccessMessage.st: -------------------------------------------------------------------------------- 1 | hints-explanations 2 | emptySuccessMessage 3 | 4 | ^ '' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/oldCompiledMethod.st: -------------------------------------------------------------------------------- 1 | accessing 2 | oldCompiledMethod 3 | 4 | ^ oldCompiledMethod -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/instance/testFailure.st: -------------------------------------------------------------------------------- 1 | tests 2 | testFailure 3 | 4 | self assert: 1 + 1 equals: 3 -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/instance/testSuccess.st: -------------------------------------------------------------------------------- 1 | tests 2 | testSuccess 3 | 4 | self assert: 1 + 1 equals: 2 -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockPartialSuccess.class/instance/testSuccess.st: -------------------------------------------------------------------------------- 1 | tests 2 | testSuccess 3 | 4 | self assert: true -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProjectChapter.class/instance/testNothing.st: -------------------------------------------------------------------------------- 1 | tests 2 | testNothing 3 | 4 | self assert: true -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you what a BlockClosure is and how it can be used. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutClasses} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you what a String is and how it can be manipulated. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/selectedChapter.st: -------------------------------------------------------------------------------- 1 | accessing 2 | selectedChapter 3 | 4 | ^ selectedChapter 5 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/defaultSuccessMessage.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | defaultSuccessMessage 3 | 4 | ^ 'Success!' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/koanList.st: -------------------------------------------------------------------------------- 1 | navigation 2 | koanList 3 | 4 | ^ self openedChapter koansInChapter -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/openedChapter.st: -------------------------------------------------------------------------------- 1 | navigation 2 | openedChapter 3 | 4 | ^ self openedKoan chapter -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/hash.st: -------------------------------------------------------------------------------- 1 | comparing 2 | hash 3 | 4 | ^ self chapter hash bitXor: self selector hash -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/testCase.st: -------------------------------------------------------------------------------- 1 | accessing 2 | testCase 3 | 4 | ^ self chapter selector: self selector -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockEmpty.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | } } 6 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/instance/testUntested.st: -------------------------------------------------------------------------------- 1 | tests 2 | testUntested 3 | 4 | self assert: 1 + 1 equals: 3 -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockFailure.class/instance/testFailure.st: -------------------------------------------------------------------------------- 1 | tests 2 | testFailure 3 | 4 | self assert: 't' equals: 's' -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockFailure.class/instance/testSuccess.st: -------------------------------------------------------------------------------- 1 | tests 2 | testSuccess 3 | 4 | self assert: 't' equals: 't' -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockFailure.class/instance/testUntested.st: -------------------------------------------------------------------------------- 1 | tests 2 | testUntested 3 | 4 | self assert: 't' equals: 's' -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockPartialSuccess.class/instance/testUntested.st: -------------------------------------------------------------------------------- 1 | tests 2 | testUntested 3 | 4 | self assert: false -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProject.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | } } 6 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockSuccess.class/instance/testSuccess.st: -------------------------------------------------------------------------------- 1 | tests 2 | testSuccess 3 | 4 | self assert: 3 equals: 1 + 2 -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutBlocks} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/class/requiredClasses.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requiredClasses 3 | 4 | ^ {KoanCrystalDice} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBambooBonsai.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | } } 6 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanCrystalDice.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | } } 6 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/koanIconAt..st: -------------------------------------------------------------------------------- 1 | ui 2 | koanIconAt: anIndex 3 | 4 | ^ (self koanList at: anIndex) icon -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/selectKoan..st: -------------------------------------------------------------------------------- 1 | browsing 2 | selectKoan: aKoan 3 | 4 | self changeToEditorViewOn: aKoan -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/windowColorToUse.st: -------------------------------------------------------------------------------- 1 | building 2 | windowColorToUse 3 | 4 | ^ self defaultWindowColor. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/methodsInChapter.st: -------------------------------------------------------------------------------- 1 | koans 2 | methodsInChapter 3 | 4 | ^ self methodsInCategory: 'tests' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/class/buttonHeight.st: -------------------------------------------------------------------------------- 1 | constants 2 | buttonHeight 3 | 4 | ^ ToolBuilder default buttonRowHeight -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/isNextButtonEnabled.st: -------------------------------------------------------------------------------- 1 | ui 2 | isNextButtonEnabled 3 | 4 | ^ self isLastKoanInChapter not -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/windowColorToUse.st: -------------------------------------------------------------------------------- 1 | building 2 | windowColorToUse 3 | 4 | ^ self defaultWindowColor. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/oldTestResult..st: -------------------------------------------------------------------------------- 1 | accessing 2 | oldTestResult: anObject 3 | 4 | oldTestResult := anObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/creationTime..st: -------------------------------------------------------------------------------- 1 | accessing 2 | creationTime: anObject 3 | creationTime := anObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/exceptionType.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | exceptionType 3 | 4 | ^ self firstException class -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/exceptions..st: -------------------------------------------------------------------------------- 1 | accessing 2 | exceptions: anObject 3 | 4 | exceptions := anObject -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/class/wasDebugged..st: -------------------------------------------------------------------------------- 1 | accessing 2 | wasDebugged: anObject 3 | 4 | WasDebugged := anObject -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/instance/debugAsFailure.st: -------------------------------------------------------------------------------- 1 | running 2 | debugAsFailure 3 | 4 | KoanMockDebug wasDebugged: true -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/instance/testErrorMessage.st: -------------------------------------------------------------------------------- 1 | tests 2 | testErrorMessage 3 | 4 | self error: 'Error Message' -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProjectChapter.class/class/requiredClasses.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requiredClasses 3 | 4 | ^ {KoanMockProject} -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockRequirements.class/instance/testSuccess.st: -------------------------------------------------------------------------------- 1 | tests 2 | testSuccess 3 | 4 | self assert: 1 + 1 equals: 2 -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockVersions.class/instance/testWithManyDifferentVersions.st: -------------------------------------------------------------------------------- 1 | tests 2 | testWithManyDifferentVersions 3 | 4 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you about Classes, their instances, and how to create them. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/README.md: -------------------------------------------------------------------------------- 1 | In this chapter you will look at Bonsais to learn the concept of inheritance. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/browseProject.st: -------------------------------------------------------------------------------- 1 | ui 2 | browseProject 3 | 4 | ^ self selectedChapter browseRequiredClasses -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/chapterDescriptionFor..st: -------------------------------------------------------------------------------- 1 | ui 2 | chapterDescriptionFor: aChapter 3 | 4 | ^ aChapter comment -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/browseProject.st: -------------------------------------------------------------------------------- 1 | actions 2 | browseProject 3 | 4 | ^ self openedChapter browseRequiredClasses -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/testOnSave..st: -------------------------------------------------------------------------------- 1 | accessing 2 | testOnSave: aBoolean 3 | 4 | self class testOnSave: aBoolean -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/printOn..st: -------------------------------------------------------------------------------- 1 | printing 2 | printOn: aStream 3 | 4 | aStream nextPutAll: self selector asString -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/firstException.st: -------------------------------------------------------------------------------- 1 | accessing 2 | firstException 3 | 4 | ^ self exceptions values first -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/testSource.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | testSource 3 | 4 | ^ self testContext sourceCode asString -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockRequirements.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanMockDebug. KoanMockEmpty} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutCollectionProtocol} 5 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutObjects. KoanAboutInheritance} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/README.md: -------------------------------------------------------------------------------- 1 | In this chapter you will learn what a Symbol is, why it is useful, and how it behaves. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanLotus.class/instance/initialize.st: -------------------------------------------------------------------------------- 1 | initialize-release 2 | initialize 3 | 4 | self publicInstanceVariable: 'aValue' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanLotus.class/instance/publicInstanceVariable.st: -------------------------------------------------------------------------------- 1 | accessing 2 | publicInstanceVariable 3 | 4 | ^ publicInstanceVariable -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/chapterIconAt..st: -------------------------------------------------------------------------------- 1 | ui 2 | chapterIconAt: anIndex 3 | 4 | ^ (self chapterList at: anIndex) icon -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/instance/initialize.st: -------------------------------------------------------------------------------- 1 | initialize-release 2 | initialize 3 | 4 | super initialize. 5 | xx := 'FILL ME IN' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/class/openOn..st: -------------------------------------------------------------------------------- 1 | instance creation 2 | openOn: aKoan 3 | 4 | ^ ToolBuilder open: (self newOnKoan: aKoan) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/isPreviousButtonEnabled.st: -------------------------------------------------------------------------------- 1 | ui 2 | isPreviousButtonEnabled 3 | 4 | ^ self isFirstKoanInChapter not -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/statusBarHeight.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | statusBarHeight 3 | 4 | ^ ToolBuilder default inputFieldHeight -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/changeRecords.st: -------------------------------------------------------------------------------- 1 | resetting 2 | changeRecords 3 | 4 | ^ self chapter changeRecordsAt: self selector -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/exceptionMessage.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | exceptionMessage 3 | 4 | ^ self firstException messageText -------------------------------------------------------------------------------- /src/Koans-Core.package/Koans.class/class/initialize.st: -------------------------------------------------------------------------------- 1 | running 2 | initialize 3 | 4 | TheWorldMenu registerOpenCommand: {'Koans'. {self. #open}} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/instance/test01whatIsABlock.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01whatIsABlock 3 | 4 | self assert: xx equals: [123] class -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you how to control flow. Loops, conditionals... we have it all. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter shows you that everything is an Object and what you can generally do with them. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/compiledMethod.st: -------------------------------------------------------------------------------- 1 | debugging 2 | compiledMethod 3 | 4 | ^ self chapter compiledMethodAt: self selector -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/oldCompiledMethod..st: -------------------------------------------------------------------------------- 1 | accessing 2 | oldCompiledMethod: anObject 3 | 4 | oldCompiledMethod := anObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/exceptionContext.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | exceptionContext 3 | 4 | ^ self firstException signalerContext -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutInheritance. KoanAboutObjects} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/instance/test02escaping.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02escaping 3 | 4 | self assert: xx equals: ('I''m here' at: 6) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutObjects. KoanAboutInheritance} -------------------------------------------------------------------------------- /src/Koans-Core.package/.filetree: -------------------------------------------------------------------------------- 1 | { 2 | "noMethodMetaData" : true, 3 | "separateMethodMetaAndSource" : false, 4 | "useCypressPropertiesFile" : true } 5 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/class/newOnKoan..st: -------------------------------------------------------------------------------- 1 | instance creation 2 | newOnKoan: aKoan 3 | 4 | ^ self new 5 | openKoan: aKoan; 6 | yourself -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/isFirstKoanInChapter.st: -------------------------------------------------------------------------------- 1 | navigation 2 | isFirstKoanInChapter 3 | 4 | ^ self koanList first = self openedKoan -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/isLastKoanInChapter.st: -------------------------------------------------------------------------------- 1 | navigation 2 | isLastKoanInChapter 3 | 4 | ^ self koanList last = self openedKoan -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/resetKoan.st: -------------------------------------------------------------------------------- 1 | actions 2 | resetKoan 3 | 4 | self openedKoan reset. 5 | self browser updateCodePaneIfNeeded -------------------------------------------------------------------------------- /src/Koans-Tests.package/.filetree: -------------------------------------------------------------------------------- 1 | { 2 | "noMethodMetaData" : true, 3 | "separateMethodMetaAndSource" : false, 4 | "useCypressPropertiesFile" : true } 5 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/.filetree: -------------------------------------------------------------------------------- 1 | { 2 | "noMethodMetaData" : true, 3 | "separateMethodMetaAndSource" : false, 4 | "useCypressPropertiesFile" : true } 5 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/.filetree: -------------------------------------------------------------------------------- 1 | { 2 | "noMethodMetaData" : true, 3 | "separateMethodMetaAndSource" : false, 4 | "useCypressPropertiesFile" : true } 5 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutCollections. KoanAboutBlocks} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/class/countAllInstancesOfNil.st: -------------------------------------------------------------------------------- 1 | accessing 2 | countAllInstancesOfNil 3 | 4 | ^ UndefinedObject allInstances size -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/class/numberOfAllInstancesOfNil.st: -------------------------------------------------------------------------------- 1 | accessing 2 | numberOfAllInstancesOfNil 3 | ^ (UndefinedObject allInstances size) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/isBrowseProjectButtonEnabled.st: -------------------------------------------------------------------------------- 1 | ui 2 | isBrowseProjectButtonEnabled 3 | 4 | ^ self openedKoan chapter isProject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/README.md: -------------------------------------------------------------------------------- 1 | I am the TestResult equivalent that is needed to test Koans and work with the result them the way you want. -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/setUp.st: -------------------------------------------------------------------------------- 1 | running 2 | setUp 3 | 4 | browser := KoanBrowser new. 5 | toolbuilder := ToolBuilder default -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/newMorphs.st: -------------------------------------------------------------------------------- 1 | running 2 | newMorphs 3 | 4 | ^ World submorphs reject: [:each | preTestWindows includes: each] -------------------------------------------------------------------------------- /src/Koans-Tests.package/monticello.meta/categories.st: -------------------------------------------------------------------------------- 1 | SystemOrganization addCategory: #'Koans-Tests'! 2 | SystemOrganization addCategory: #'Koans-Tests-Mocks'! 3 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/class/requiredClasses.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requiredClasses 3 | 4 | ^ {KoanBonsai. KoanAiderBonsai. KoanMapleBonsai} -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/class/requirements.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requirements 3 | 4 | ^ {KoanAboutBlocks. KoanAboutObjects. KoanAboutInheritance} -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/chapterTooltipFor..st: -------------------------------------------------------------------------------- 1 | ui 2 | chapterTooltipFor: anIndex 3 | 4 | ^ self tooltipFor: (self chapterList at: anIndex) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/requiredClassesNames.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requiredClassesNames 3 | 4 | ^ self requiredClasses collect: [:class | class name] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/setBrowserTo..st: -------------------------------------------------------------------------------- 1 | actions 2 | setBrowserTo: aKoan 3 | 4 | self browser setClass: aKoan chapter selector: aKoan selector -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/isExpired.st: -------------------------------------------------------------------------------- 1 | accessing 2 | isExpired 3 | 4 | ^ Time utcMicrosecondClock - self creationTime > self expirationTime -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/instance/setUp.st: -------------------------------------------------------------------------------- 1 | running 2 | setUp 3 | 4 | var := #setUp. 5 | Transcript 6 | show: self selector, '~~', var; 7 | cr -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/tearDown.st: -------------------------------------------------------------------------------- 1 | running 2 | tearDown 3 | 4 | browser closeOpenedWindow. 5 | self newMorphs do: [:each | each delete] -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanLotus.class/instance/publicInstanceVariable..st: -------------------------------------------------------------------------------- 1 | accessing 2 | publicInstanceVariable: anObject 3 | 4 | publicInstanceVariable := anObject -------------------------------------------------------------------------------- /src/Koans-Chapters.package/monticello.meta/categories.st: -------------------------------------------------------------------------------- 1 | SystemOrganization addCategory: #'Koans-Chapters'! 2 | SystemOrganization addCategory: #'Koans-Chapters-Bonsai'! 3 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockUnchanged.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "testUntested" : "rhi 10/13/2017 17:15" } } 6 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAiderBonsai.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "fruits" : "pre 10/16/2011 16:51:18.832" } } 6 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/koansInChapter.st: -------------------------------------------------------------------------------- 1 | koans 2 | koansInChapter 3 | 4 | ^ self methodsInChapter collect: [:method | KoanStep on: self selector: method] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/resetKoansInChapter.st: -------------------------------------------------------------------------------- 1 | koans 2 | resetKoansInChapter 3 | 4 | self resetHistory. 5 | self koansInChapter do: [:koan | koan reset] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/successMessage.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | successMessage 3 | 4 | ^ self openedKoan successMessage ifEmpty: [^ self defaultSuccessMessage] -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/instance/tearDown.st: -------------------------------------------------------------------------------- 1 | running 2 | tearDown 3 | 4 | var := #tearDown. 5 | Transcript 6 | show: self selector, '~~', var; 7 | cr -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockSuccess.class/class/resetToState.st: -------------------------------------------------------------------------------- 1 | initialize 2 | resetToState 3 | 4 | super resetToState. 5 | (self run: #testSuccess) updateResultsInHistory -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you what a Collection is, about some of its most important kinds, and the differences between them. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you the difference between true and false, as well as some logical operators. Proceed for truth. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/README.md: -------------------------------------------------------------------------------- 1 | I am the model for the window in which you can explore all Koans. When you select a Koan, I will close and open the KoanEditor. 2 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/koanList.st: -------------------------------------------------------------------------------- 1 | ui 2 | koanList 3 | 4 | ^ self selectedChapter 5 | ifNil: [#()] 6 | ifNotNil: [self selectedChapter koansInChapter] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/statusBarTextColor.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | statusBarTextColor 3 | 4 | self openedKoan isErroring ifTrue: [^ Color white]. 5 | ^ Color black -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testSuccessStatusBar.st: -------------------------------------------------------------------------------- 1 | tests-statusbar 2 | testSuccessStatusBar 3 | 4 | self assert: 'Success!' equals: editor statusBarText -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you advanced (and exciting yet in most circumstances discouraged) meta concepts of using classes and messages. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/updateButtonState.st: -------------------------------------------------------------------------------- 1 | ui 2 | updateButtonState 3 | 4 | self 5 | changed: #isNextButtonEnabled; 6 | changed: #isPreviousButtonEnabled -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/exceptionLine.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | exceptionLine 3 | 4 | ^ (self testSource lineNumber: self lineNumberOfException) withBlanksCondensed -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testChapterListIsNotEmpty.st: -------------------------------------------------------------------------------- 1 | tests-chapterList 2 | testChapterListIsNotEmpty 3 | 4 | self deny: browser chapterList isEmpty 5 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockPartialSuccess.class/class/resetToState.st: -------------------------------------------------------------------------------- 1 | initialize 2 | resetToState 3 | 4 | super resetToState. 5 | (self run: #testSuccess) updateResultsInHistory -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockVersions.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "testWithManyDifferentVersions" : "SL 7/2/2017 17:45" } } 6 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/BaselineOfKoans.class/instance/projectClass.st: -------------------------------------------------------------------------------- 1 | accessing 2 | projectClass 3 | 4 | ^ Smalltalk at: #MetacelloCypressBaselineProject ifAbsent: [super projectClass] -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/class/requiredClasses.st: -------------------------------------------------------------------------------- 1 | accessing 2 | requiredClasses 3 | 4 | ^ {KoanAiderBonsai. KoanBambooBonsai. KoanMetaBonsai. KoanBonsai. KoanMapleBonsai} -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/README.md: -------------------------------------------------------------------------------- 1 | I am the model for the window in which you can edit the Koans. I implement the functionality for the buttons and how the window should be built. -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/instance/test01.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01 3 | 4 | var := #test01. 5 | Transcript 6 | show: self selector, '~~', var; 7 | cr. 8 | self assert: true -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/instance/testError.st: -------------------------------------------------------------------------------- 1 | tests 2 | testError 3 | 4 | "Just an example, never gets executed because of the exception" 5 | self assert: 3 / 0 equals: 0 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/isProjectChapter.st: -------------------------------------------------------------------------------- 1 | ui 2 | isProjectChapter 3 | 4 | ^ self selectedChapter 5 | ifNil: [false] 6 | ifNotNil: [self selectedChapter isProject] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/browseRequiredClasses.st: -------------------------------------------------------------------------------- 1 | koans 2 | browseRequiredClasses 3 | 4 | ^ ClassListBrowser newOnClassesNamed: self requiredClassesNames label: self name. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/toggleTestOnSave.st: -------------------------------------------------------------------------------- 1 | test 2 | toggleTestOnSave 3 | 4 | self testOnSave 5 | ifTrue: [self disableTestOnSave] 6 | ifFalse: [self enableTestOnSave] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/saveTestResult..st: -------------------------------------------------------------------------------- 1 | sunit 2 | saveTestResult: aTestResult 3 | 4 | self oldCompiledMethod: self compiledMethod. 5 | self oldTestResult: aTestResult -------------------------------------------------------------------------------- /src/Koans-Core.package/Koans.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "initialize" : "rhi 10/12/2017 12:02", 4 | "open" : "mt 10/12/2017 11:04" }, 5 | "instance" : { 6 | } } 7 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testBrowseProjectButtonIsDisabled.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testBrowseProjectButtonIsDisabled 3 | 4 | self deny: editor isBrowseProjectButtonEnabled -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test09symbolsCanBeDynamicallyCreated.st: -------------------------------------------------------------------------------- 1 | tests 2 | test09symbolsCanBeDynamicallyCreated 3 | 4 | self assert: xx equals: 'cats' , 'dogs' asSymbol -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/disableTestOnSave.st: -------------------------------------------------------------------------------- 1 | test 2 | disableTestOnSave 3 | 4 | self testOnSave: false. 5 | SystemChangeNotifier uniqueInstance noMoreNotificationsFor: self -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/class/on.selector..st: -------------------------------------------------------------------------------- 1 | instance creation 2 | on: aKoanCase selector: aSymbol 3 | 4 | ^ self new 5 | chapter: aKoanCase; 6 | selector: aSymbol; 7 | yourself -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/openKoan..st: -------------------------------------------------------------------------------- 1 | actions 2 | openKoan: aKoan 3 | 4 | self 5 | openedKoan: aKoan; 6 | setBrowserTo: aKoan; 7 | changed: #windowTitle; 8 | updateStatusBar -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/hasChanged.st: -------------------------------------------------------------------------------- 1 | testing 2 | hasChanged 3 | 4 | ^ self oldCompiledMethod 5 | ifNil: [true] 6 | ifNotNil: [(self compiledMethod = self oldCompiledMethod) not] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/initialize.st: -------------------------------------------------------------------------------- 1 | initialization 2 | initialize 3 | 4 | super initialize. 5 | exceptions := Dictionary new. 6 | creationTime := Time utcMicrosecondClock -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockCase.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "isMock" : "JLO 6/14/2017 15:45", 4 | "resetToState" : "JLO 6/14/2017 16:11" }, 5 | "instance" : { 6 | } } 7 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockSuccess.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "resetToState" : "JLO 6/14/2017 16:18" }, 4 | "instance" : { 5 | "testSuccess" : "JLO 6/14/2017 16:17" } } 6 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test01symbolsAreSymbols.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01symbolsAreSymbols 3 | 4 | | symbol | 5 | symbol := #Smalltalk. 6 | self assert: xx equals: symbol isSymbol -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/selectedKoan..st: -------------------------------------------------------------------------------- 1 | accessing 2 | selectedKoan: aKoan 3 | 4 | selectedKoan = aKoan ifTrue: [^ self]. 5 | selectedKoan := aKoan. 6 | self changed: #selectedKoan. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/initialize.st: -------------------------------------------------------------------------------- 1 | initialization 2 | initialize 3 | 4 | super initialize. 5 | self browser: Browser new. 6 | self class testOnSave ifTrue: [self enableTestOnSave] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/toggleTestOnSaveLabel.st: -------------------------------------------------------------------------------- 1 | test 2 | toggleTestOnSaveLabel 3 | 4 | ^ self testOnSave 5 | ifTrue: [' test when saving'] 6 | ifFalse: [' test when saving'] -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockRequirements.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "requirements" : "rhi 10/12/2017 13:02" }, 4 | "instance" : { 5 | "testSuccess" : "JLO 7/26/2017 14:19" } } 6 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/BaselineOfKoans.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "baseline:" : "pre 10/30/2018 13:44", 6 | "projectClass" : "mt 10/26/2022 09:39" } } 7 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/instance/test04alsoNotAndImplies.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04alsoNotAndImplies 3 | 4 | self assert: xx equals: false not. 5 | self assert: xx equals: false ==> [true] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/instance/debugAsFailure.st: -------------------------------------------------------------------------------- 1 | running 2 | debugAsFailure 3 | 4 | (Process 5 | forBlock: [self debug] 6 | runUntil: [:context | context selector = testSelector]) 7 | debug. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/currentSuccessMessageSelector.st: -------------------------------------------------------------------------------- 1 | hints-explanations 2 | currentSuccessMessageSelector 3 | 4 | ^ ((self selector copyReplaceAll: 'test' with: 'koan'), 'Success') asSymbol -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProjectChapter.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "requiredClasses" : "rhi 10/12/2017 13:02" }, 4 | "instance" : { 5 | "testNothing" : "JLO 7/12/2017 15:20" } } 6 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/instance/test04blocksCanBeStored.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04blocksCanBeStored 3 | 4 | | storedBlock | 5 | storedBlock := ['result']. 6 | self assert: xx equals: storedBlock value -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test01includes.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01includes 3 | 4 | | flowers | 5 | flowers := {#rose . #lily . #bindweed}. 6 | self assert: (flowers includes: xx) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test03arraysAreImmutable.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03arraysAreImmutable 3 | 4 | | array | 5 | array := Array new. 6 | self should: [array add: #someElement] raise: xx -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test09loopExecution.st: -------------------------------------------------------------------------------- 1 | tests 2 | test09loopExecution 3 | 4 | | a | 5 | a := 2. 6 | [a < 10] whileTrue: [a := a * a]. 7 | self assert: xx equals: a -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/addModelItemsToWindowMenu..st: -------------------------------------------------------------------------------- 1 | building 2 | addModelItemsToWindowMenu: aMenu 3 | 4 | aMenu 5 | addLine; 6 | add: 'Reset all Koans' target: self selector: #resetAllKoans -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/updateStatusBar.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | updateStatusBar 3 | 4 | self 5 | changed: #statusBarTextColor; 6 | changed: #statusBarBackgroundColor; 7 | changed: #statusBarText -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testNextJumpsToNextKoan.st: -------------------------------------------------------------------------------- 1 | tests 2 | testNextJumpsToNextKoan 3 | 4 | editor nextKoan. 5 | self assert: editor openedKoan selector equals: #testUntested 6 | 7 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testWindowTitleIfOpenedKoanIsNil.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testWindowTitleIfOpenedKoanIsNil 3 | 4 | editor openedKoan: nil. 5 | self assert: editor windowTitle = 'Koan Editor' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/instance/test02aBlockCanBeExecuted.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02aBlockCanBeExecuted 3 | 4 | self assert: xx equals: [123] value. 5 | self assert: xx equals: [false and: [false]] value -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test08symbolsAreImmutable.st: -------------------------------------------------------------------------------- 1 | tests 2 | test08symbolsAreImmutable 3 | 4 | | symbol | 5 | symbol := #notAString. 6 | self should: [symbol at: 1 put: 'a' ] raise: xx -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/welcomeMessage.st: -------------------------------------------------------------------------------- 1 | ui 2 | welcomeMessage 3 | 4 | ^ 'Welcome to the Koans. If you want to proceed on your path to enlightenment choose a chapter (on the left) to meditate on.' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/testResult.st: -------------------------------------------------------------------------------- 1 | sunit 2 | testResult 3 | 4 | (self oldTestResult isNil or: [self oldTestResult isExpired]) 5 | ifTrue: [^ self newTestResult] 6 | ifFalse: [^ self oldTestResult] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/README.md: -------------------------------------------------------------------------------- 1 | I am the parent class for all the classes in which Koans are saved. I implement some functionality that helps to deal with the current format Chapter and Koans are organized. 2 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testChapterTooltipNotNil.st: -------------------------------------------------------------------------------- 1 | tests-chapterList 2 | testChapterTooltipNotNil 3 | 4 | self assert: (browser chapterList allSatisfy: [:chapter | 5 | chapter requirements notNil]) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testKoanListIsNotNilWhenNoChapterSelected.st: -------------------------------------------------------------------------------- 1 | tests 2 | testKoanListIsNotNilWhenNoChapterSelected 3 | 4 | browser selectedChapter: nil. 5 | self deny: browser koanList isNil -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/instance/testKoansInChapterAreKoanSteps.st: -------------------------------------------------------------------------------- 1 | tests 2 | testKoansInChapterAreKoanSteps 3 | 4 | self assert: (KoanMockError koansInChapter allSatisfy: [:koan | 5 | koan class = KoanStep]) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/setUp.st: -------------------------------------------------------------------------------- 1 | running 2 | setUp 3 | 4 | koan := KoanStep on: KoanMockError selector: #testSuccess. 5 | editor := KoanEditor newOnKoan: koan. 6 | toolbuilder := ToolBuilder default -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockFailure.class/class/resetToState.st: -------------------------------------------------------------------------------- 1 | initialize 2 | resetToState 3 | 4 | super resetToState. 5 | (self run: #testFailure) updateResultsInHistory. 6 | (self run: #testSuccess) updateResultsInHistory -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/class/koan01assertTruthSuccess.st: -------------------------------------------------------------------------------- 1 | hints-explanations 2 | koan01assertTruthSuccess 3 | 4 | ^ 'Success! You have solved your first task. Click on the button labelled "Next" to proceed.' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/instance/test01assertTruth.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01assertTruth 3 | "We shall contemplate truth by testing reality, via asserts." 4 | 5 | self assert: false "This should be true. Please fix!" -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/instance/test01createAnInstanceWithNew.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01createAnInstanceWithNew 3 | 4 | | anObject | 5 | anObject := Object new. 6 | self assert: xx equals: anObject class = Object -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/instance/test04aNewLineIsAnewline.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04aNewLineIsAnewline 3 | 4 | | a | 5 | a := 'Hello 6 | World'. 7 | self assert: xx equals: 'Hello' , Character cr asString , 'World' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test05symbolsCanBeMadeFromStrings.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05symbolsCanBeMadeFromStrings 3 | 4 | | string | 5 | string := 'Cats and dogs'. 6 | self assert: xx equals: string asSymbol -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test06symbolsWithSpacesCanBeMade.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06symbolsWithSpacesCanBeMade 3 | 4 | | symbol | 5 | symbol := #'Cats and dogs'. 6 | self assert: symbol equals: xx asSymbol -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/descriptionBoxContent.st: -------------------------------------------------------------------------------- 1 | ui 2 | descriptionBoxContent 3 | 4 | ^ self selectedChapter 5 | ifNil: [self welcomeMessage] 6 | ifNotNil: [self chapterDescriptionFor: self selectedChapter] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/selectedChapter..st: -------------------------------------------------------------------------------- 1 | accessing 2 | selectedChapter: anObject 3 | 4 | selectedChapter = anObject ifTrue: [^ self]. 5 | selectedChapter := anObject. 6 | self changed: #selectedChapter. -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/createTestSuite.st: -------------------------------------------------------------------------------- 1 | sunit 2 | createTestSuite 3 | 4 | | suite | 5 | suite := TestSuite named: 'koan-testsuite-' , self identityHash asString. 6 | suite addTest: self testCase. 7 | ^ suite -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/lineNumberOfException.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | lineNumberOfException 3 | 4 | | range | 5 | range := self sourceRangeOfException. 6 | ^ (self testSource first: range first - 1) lineCount -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testPreviousJumpsToPreviousKoan.st: -------------------------------------------------------------------------------- 1 | tests 2 | testPreviousJumpsToPreviousKoan 3 | 4 | editor previousKoan. 5 | self assert: editor openedKoan selector equals: #testFailure 6 | 7 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/instance/test04askSuperWithSuper.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04askSuperWithSuper 3 | 4 | | aMapleBonsai | 5 | aMapleBonsai := KoanMapleBonsai new. 6 | self assert: xx equals: aMapleBonsai width -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/enableTestOnSave.st: -------------------------------------------------------------------------------- 1 | test 2 | enableTestOnSave 3 | 4 | self testOnSave: true. 5 | SystemChangeNotifier uniqueInstance notify: self 6 | ofSystemChangesOfItem: #method 7 | using: #onSave: -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/instance/testIsProjectReturnsBoolean.st: -------------------------------------------------------------------------------- 1 | tests 2 | testIsProjectReturnsBoolean 3 | 4 | self assert: (KoanChapter allChapters allSatisfy: [:chapter | 5 | chapter isProject isKindOf: Boolean]) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/instance/testKoansInChapterContainsCorrectNumberOfKoans.st: -------------------------------------------------------------------------------- 1 | tests 2 | testKoansInChapterContainsCorrectNumberOfKoans 3 | 4 | self assert: 5 equals: KoanMockError koansInChapter size 5 | 6 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/instance/test02andIsAMessageOfBoolean.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02andIsAMessageOfBoolean 3 | 4 | self assert: xx equals: (Boolean canUnderstand: #and:). 5 | self assert: xx equals: (true and: [false]) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/instance/test03orIsAMessageOfBoolean.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03orIsAMessageOfBoolean 3 | 4 | self assert: xx equals: (Boolean canUnderstand: #or:). 5 | self assert: xx equals: (true or: [false]) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/README.md: -------------------------------------------------------------------------------- 1 | I am a wrapper class for a Koan which is usually only a selector of a class (ByteSymbol). 2 | If you want any functionality that would usually be placed inside a Koan class look no further than here. -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testBrowseButtonDisabledForNormalChapter.st: -------------------------------------------------------------------------------- 1 | tests 2 | testBrowseButtonDisabledForNormalChapter 3 | 4 | browser selectChapter: KoanMockError. 5 | self assert: browser isProjectChapter not -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testBuildWithReturnsWindow.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildWithReturnsWindow 3 | 4 | | window | 5 | window := browser buildWith: toolbuilder. 6 | self assert: (window isKindOf: SystemWindow) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testBuildWithReturnsWindow.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildWithReturnsWindow 3 | 4 | | window | 5 | window := editor buildWith: toolbuilder. 6 | self assert: (window isKindOf: SystemWindow) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoansTests.class/instance/removeKoansWindows.st: -------------------------------------------------------------------------------- 1 | tests 2 | removeKoansWindows 3 | 4 | (SystemWindow windowsIn: World satisfying: [:w | w label = 'Koans']) do: [:each | 5 | each model canDiscardEdits ifTrue: [each delete]]. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/class/koan05whoIAmTellsYouClassSuccess.st: -------------------------------------------------------------------------------- 1 | as yet unclassified 2 | koan05whoIAmTellsYouClassSuccess 3 | 4 | ^ 'Success! Remember to only use meta programming if absolutely required for the situation.' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/README.md: -------------------------------------------------------------------------------- 1 | Most of the things you would ever want to do with a Collection are already there and easy to use. In this chapter you will learn many useful (idiomatic) ways to enumerate Collections. -------------------------------------------------------------------------------- /src/Koans-Core.package/.squot-contents: -------------------------------------------------------------------------------- 1 | SquotTrackedObjectMetadata { 2 | #objectClassName : #PackageInfo, 3 | #id : UUID [ '08681f33e5a49048bb35de3ab4a193e1' ], 4 | #objectsReplacedByNames : true, 5 | #serializer : #SquotCypressCodeSerializer 6 | } -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/selectChapter..st: -------------------------------------------------------------------------------- 1 | browsing 2 | selectChapter: aChapter 3 | 4 | self 5 | selectedChapter: aChapter; 6 | changed: #koanList; 7 | changed: #isProjectChapter; 8 | changed: #descriptionBoxContent -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/addModelItemsToWindowMenu..st: -------------------------------------------------------------------------------- 1 | building 2 | addModelItemsToWindowMenu: aMenu 3 | 4 | aMenu 5 | addLine; 6 | addUpdating: #toggleTestOnSaveLabel 7 | target: self 8 | action: #toggleTestOnSave -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/^equals.st: -------------------------------------------------------------------------------- 1 | comparing 2 | = anotherKoanStep 3 | 4 | anotherKoanStep species == self species ifFalse: [^ false]. 5 | ^ anotherKoanStep chapter = self chapter and: [anotherKoanStep selector = self selector ] -------------------------------------------------------------------------------- /src/Koans-Tests.package/.squot-contents: -------------------------------------------------------------------------------- 1 | SquotTrackedObjectMetadata { 2 | #objectClassName : #PackageInfo, 3 | #id : UUID [ '3a7572e31368c1418f033579527033df' ], 4 | #objectsReplacedByNames : true, 5 | #serializer : #SquotCypressCodeSerializer 6 | } -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testBrowseButtonEnabledForProjectChapter.st: -------------------------------------------------------------------------------- 1 | tests 2 | testBrowseButtonEnabledForProjectChapter 3 | 4 | browser selectChapter: KoanMockProjectChapter. 5 | self assert: browser isProjectChapter -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testNextButtonBecomesDisabled.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testNextButtonBecomesDisabled 3 | 4 | self assert: editor isNextButtonEnabled. 5 | editor nextKoan. 6 | self assert: editor isNextButtonEnabled not -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/clearHistory..st: -------------------------------------------------------------------------------- 1 | tests 2 | clearHistory: aKoan 3 | 4 | #(errors failures passed) do: [:aSymbol | 5 | ((TestResult historyFor: aKoan chapter) at: aSymbol) 6 | remove: aKoan selector ifAbsent: []] -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/.squot-contents: -------------------------------------------------------------------------------- 1 | SquotTrackedObjectMetadata { 2 | #objectClassName : #PackageInfo, 3 | #id : UUID [ '87f18971491b3842a7a8fd802d5a6517' ], 4 | #objectsReplacedByNames : true, 5 | #serializer : #SquotCypressCodeSerializer 6 | } -------------------------------------------------------------------------------- /src/Koans-Chapters.package/.squot-contents: -------------------------------------------------------------------------------- 1 | SquotTrackedObjectMetadata { 2 | #objectClassName : #PackageInfo, 3 | #id : UUID [ '3598d4f4f8d6fa4bb1221f7a8f270b54' ], 4 | #objectsReplacedByNames : true, 5 | #serializer : #SquotCypressCodeSerializer 6 | } -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/instance/test01callAMethodOrLeaveAMessage.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01callAMethodOrLeaveAMessage 3 | 4 | | aBonsai | 5 | aBonsai := KoanAiderBonsai new. 6 | self assert: aBonsai width equals: (aBonsai perform: xx) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/class/koan07useCascadesToNotRepeatSuccess.st: -------------------------------------------------------------------------------- 1 | hints-explanations 2 | koan07useCascadesToNotRepeatSuccess 3 | 4 | ^ 'Success! Cascades should be used whenever you send multiple messages to the same receiver.' -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testChapterListContainsChapters.st: -------------------------------------------------------------------------------- 1 | tests-chapterList 2 | testChapterListContainsChapters 3 | 4 | self assert: (browser chapterList allSatisfy: [:element | 5 | element isKindOf: KoanChapter class]) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/instance/testChapterColorSystem.st: -------------------------------------------------------------------------------- 1 | tests 2 | testChapterColorSystem 3 | 4 | self correctPairs keysAndValuesDo: [:chapter :icon | 5 | chapter resetToState. 6 | self assert: chapter toolIcon equals: icon] -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testNextStopsAtChapterBoundary.st: -------------------------------------------------------------------------------- 1 | tests 2 | testNextStopsAtChapterBoundary 3 | 4 | editor 5 | nextKoan; 6 | nextKoan. 7 | self assert: editor openedKoan selector equals: #testUntested 8 | 9 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/instance/test02variablesAreInitializedToNil.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02variablesAreInitializedToNil 3 | "What value does a variable have before one is assigned?" 4 | 5 | | aVariable | 6 | self assert: xx equals: aVariable -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMapleBonsai.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "color" : "JLO 8/4/2017 14:31", 6 | "fruits" : "pre 10/16/2011 16:51:43.142", 7 | "width" : "pre 10/16/2011 16:55:32.388" } } 8 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/resetAllKoans.st: -------------------------------------------------------------------------------- 1 | browsing 2 | resetAllKoans 3 | 4 | Cursor wait showWhile: [ 5 | self chapterList do: [:chapter | chapter resetKoansInChapter]]. 6 | self changed: #koanList. 7 | self changed: #chapterList -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testChapterTooltip.st: -------------------------------------------------------------------------------- 1 | tests 2 | testChapterTooltip 3 | 4 | self assert: (browser tooltipFor: KoanMockRequirements) 5 | equals: 'You should do the following Chapters first: KoanMockDebug KoanMockEmpty'. -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testBuildBrowserWithReturnsSpec.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildBrowserWithReturnsSpec 3 | 4 | | spec | 5 | spec := editor buildBrowserWith: toolbuilder. 6 | self assert: (spec isKindOf: ToolBuilderSpec) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockPartialSuccess.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "resetToState" : "JLO 6/14/2017 16:16" }, 4 | "instance" : { 5 | "testSuccess" : "JLO 6/14/2017 16:15", 6 | "testUntested" : "JLO 6/14/2017 16:16" } } 7 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/clearHistory.for..st: -------------------------------------------------------------------------------- 1 | tests 2 | clearHistory: aClass for: aSelector 3 | 4 | #(errors failures passed) do: [:aSymbol | 5 | ((TestResult historyFor: aClass) at: aSymbol) 6 | remove: aSelector ifAbsent: []] -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/README.md: -------------------------------------------------------------------------------- 1 | This chapter teaches you about asserts and how they work. Asserts are used throughout the Koans to validate your input and test your comprehension. Start your path to enlighenment by selecting the first test. -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test07nil.st: -------------------------------------------------------------------------------- 1 | tests 2 | test07nil 3 | 4 | | b | 5 | nil ifNil: [b := 1] ifNotNil: [b := 2]. 6 | self assert: xx equals: b. 7 | 5 ifNil: [b := 1] ifNotNil: [b := 2]. 8 | self assert: xx equals: b -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/instance/test01thereIsOnlyOneNil.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01thereIsOnlyOneNil 3 | "The concept of nil represents nothingness. How many nil objects are there?" 4 | 5 | self assert: xx equals: self class countAllInstancesOfNil -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/nextKoan.st: -------------------------------------------------------------------------------- 1 | actions 2 | nextKoan 3 | 4 | | nextKoan | 5 | nextKoan := self koanList after: self openedKoan ifAbsent: []. 6 | self isLastKoanInChapter not ifTrue: [self openKoan: nextKoan]. 7 | self updateButtonState -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testBuildKoanListWithReturnsSpec.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildKoanListWithReturnsSpec 3 | 4 | | spec | 5 | spec := browser buildKoanListWith: toolbuilder. 6 | self assert: (spec isKindOf: ToolBuilderSpec) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/instance/testChapterColor.st: -------------------------------------------------------------------------------- 1 | tests 2 | testChapterColor 3 | 4 | self correctPairs keysAndValuesDo: [:chapter :symbol | 5 | chapter resetToState. 6 | self assert: chapter icon equals: (ToolIcons iconNamed: symbol)] -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testBuildButtonBarWithReturnsSpec.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildButtonBarWithReturnsSpec 3 | 4 | | spec | 5 | spec := editor buildButtonBarWith: toolbuilder. 6 | self assert: (spec isKindOf: ToolBuilderSpec) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testBuildStatusBarWithReturnsSpec.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildStatusBarWithReturnsSpec 3 | 4 | | spec | 5 | spec := editor buildStatusBarWith: toolbuilder. 6 | self assert: (spec isKindOf: ToolBuilderSpec) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/class/koan06classesUnderstandCanUnderstandSuccess.st: -------------------------------------------------------------------------------- 1 | as yet unclassified 2 | koan06classesUnderstandCanUnderstandSuccess 3 | 4 | ^ 'Success! Remember to only use meta programming if absolutely required for the situation.' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/instance/test06stringsAreNotUnique.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06stringsAreNotUnique 3 | 4 | | a b | 5 | a := 'Hello World'. 6 | b := 'Hello', ' ', 'World'. 7 | self assert: xx equals: a == b. 8 | self assert: xx equals: a = b -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoansTests.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "removeKoansWindows" : "rhi 10/12/2017 13:00", 6 | "testWindowCreation" : "rhi 10/12/2017 13:01", 7 | "testWorldMenu" : "rhi 10/12/2017 13:01" } } 8 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test07symbolsAreSpecialStrings.st: -------------------------------------------------------------------------------- 1 | tests 2 | test07symbolsAreSpecialStrings 3 | 4 | | symbol | 5 | symbol := #Smalltalk. 6 | self assert: xx equals: symbol isString. 7 | self assert: xx equals: symbol = 'Smalltalk' -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testBuildBrowseButtonWithReturnsSpec.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildBrowseButtonWithReturnsSpec 3 | 4 | | spec | 5 | spec := browser buildBrowseButtonWith: toolbuilder. 6 | self assert: (spec isKindOf: ToolBuilderSpec) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testBuildChapterListWithReturnsSpec.st: -------------------------------------------------------------------------------- 1 | tests-building 2 | testBuildChapterListWithReturnsSpec 3 | 4 | | spec | 5 | spec := browser buildChapterListWith: toolbuilder. 6 | self assert: (spec isKindOf: ToolBuilderSpec) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/instance/testRequiredClassesAreClasses.st: -------------------------------------------------------------------------------- 1 | tests 2 | testRequiredClassesAreClasses 3 | 4 | self assert: (KoanChapter allChapters allSatisfy: [:chapter | 5 | chapter requiredClasses allSatisfy: [:class | class isKindOf: Class]]) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testNextButtonBecomesEnabled.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testNextButtonBecomesEnabled 3 | 4 | editor nextKoan. 5 | self assert: editor isNextButtonEnabled not. 6 | editor previousKoan. 7 | self assert: editor isNextButtonEnabled -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testPreviousStopsAtChapterBoundary.st: -------------------------------------------------------------------------------- 1 | tests 2 | testPreviousStopsAtChapterBoundary 3 | 4 | editor 5 | previousKoan; 6 | previousKoan; 7 | previousKoan. 8 | self assert: editor openedKoan selector equals: #testError -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/instance/test02assertWithDescription.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02assertWithDescription 3 | "Enlightenment may be more easily achieved with appropriate messages." 4 | 5 | self assert: false description: 'This should be true. Please fix!' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test04conditionalExecutionWithExpressions.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04conditionalExecutionWithExpressions 3 | 4 | | a b | 5 | a := 1. 6 | b := 2. 7 | (true and: [xx]) ifTrue: [a := b]. 8 | self assert: b equals: a -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanLotus.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "initialize" : "rhi 10/12/2017 09:13", 6 | "publicInstanceVariable" : "rhi 10/12/2017 09:12", 7 | "publicInstanceVariable:" : "rhi 10/12/2017 09:12" } } 8 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMetaBonsai.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "fruit1" : "pre 3/7/2017 11:41", 6 | "fruit2" : "pre 3/7/2017 11:41", 7 | "fruit3" : "pre 3/7/2017 11:41", 8 | "fruit4" : "pre 3/7/2017 11:41" } } 9 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testWindowTitleContainsKoan.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testWindowTitleContainsKoan 3 | 4 | self assert: (editor windowTitle includesSubstring: koan chapter name). 5 | self assert: (editor windowTitle includesSubstring: koan selector) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/class/resetToState.st: -------------------------------------------------------------------------------- 1 | initialize 2 | resetToState 3 | 4 | super resetToState. 5 | (self run: #testFailure) updateResultsInHistory. 6 | (self run: #testSuccess) updateResultsInHistory. 7 | (self run: #testError) updateResultsInHistory -------------------------------------------------------------------------------- /.squot: -------------------------------------------------------------------------------- 1 | OrderedDictionary { 2 | 'src/BaselineOfKoans.package' : #SquotCypressCodeSerializer, 3 | 'src/Koans-Chapters.package' : #SquotCypressCodeSerializer, 4 | 'src/Koans-Core.package' : #SquotCypressCodeSerializer, 5 | 'src/Koans-Tests.package' : #SquotCypressCodeSerializer 6 | } -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test05statementsInAssignments.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05statementsInAssignments 3 | 4 | | a b | 5 | a := true and: false. 6 | self assert: xx equals: a. 7 | b := a ifTrue: [1] ifFalse: [2]. 8 | self assert: xx equals: b -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/instance/test02sendAMessageWithAttachedArguments.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02sendAMessageWithAttachedArguments 3 | 4 | | aBonsai | 5 | aBonsai := KoanAiderBonsai new. 6 | aBonsai perform: xx with: 10. 7 | self assert: 10 equals: aBonsai height -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoansTests.class/instance/testWorldMenu.st: -------------------------------------------------------------------------------- 1 | tests 2 | testWorldMenu 3 | 4 | TheWorldMenu unregisterOpenCommand: 'Koans'. 5 | Koans initialize. 6 | self assert: (TheWorldMenu registeredOpenCommands 7 | includes: {'Koans'. {Koans. #open}}) 8 | equals: true -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test07detect.st: -------------------------------------------------------------------------------- 1 | tests 2 | test07detect 3 | 4 | | smallNumbers | 5 | smallNumbers := {1 . 2 . 3 . 4}. 6 | self assert: xx equals: (smallNumbers detect: [:a | a > 2]). 7 | self assert: 1 equals: (smallNumbers detect: xx) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/class/koan08useCascadesToNotRepeatButBeCareful1Success.st: -------------------------------------------------------------------------------- 1 | hints-explanations 2 | koan08useCascadesToNotRepeatButBeCareful1Success 3 | 4 | ^ 'Success! The return value of #add: is the newly added value, not the collection it was added to.' -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test06copyObjectsWithNewFrom.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06copyObjectsWithNewFrom 3 | 4 | | anyObject aNewObject | 5 | anyObject := Object new. 6 | aNewObject := Object newFrom: anyObject. 7 | self assert: xx equals: anyObject ~~ aNewObject -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/previousKoan.st: -------------------------------------------------------------------------------- 1 | actions 2 | previousKoan 3 | 4 | | previousKoan | 5 | previousKoan := self koanList before: self openedKoan ifAbsent: []. 6 | self isFirstKoanInChapter not ifTrue: [self openKoan: previousKoan]. 7 | self updateButtonState -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/successMessage.st: -------------------------------------------------------------------------------- 1 | hints-explanations 2 | successMessage 3 | 4 | ^ (self chapter respondsTo: self currentSuccessMessageSelector) 5 | ifTrue: [self chapter perform: self currentSuccessMessageSelector] 6 | ifFalse: [self emptySuccessMessage ] -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testErrorStatusBar.st: -------------------------------------------------------------------------------- 1 | tests-statusbar 2 | testErrorStatusBar 3 | 4 | editor openKoan: (KoanStep on: KoanMockError selector: #testError). 5 | self assert: 'ZeroDivide at line 4: self assert: 3 / 0 equals: 0' equals: editor statusBarText -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoansTests.class/instance/testWindowCreation.st: -------------------------------------------------------------------------------- 1 | tests 2 | testWindowCreation 3 | 4 | self removeKoansWindows. 5 | Koans open. 6 | self assert: (SystemWindow windowsIn: World satisfying: [:w | w label = 'Koans']) size 7 | equals: 1. 8 | self removeKoansWindows -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test05set.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05set 3 | 4 | | set | 5 | set := {'I' . 'am' . 'a' . 'great' . 'set!'} asSet. 6 | self assert: (set add: 'a') equals: xx. 7 | self assert: (set add: 'some') equals: xx. 8 | self assert: set equals: xx -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test03identicalSymbolsAreASingleIdenticalObject.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03identicalSymbolsAreASingleIdenticalObject 3 | 4 | | symbol1 symbol2 | 5 | symbol1 := #aSymbol. 6 | symbol2 := #aSymbol. 7 | self assert: xx equals: symbol1 == symbol2 -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/statusBarText.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | statusBarText 3 | 4 | self openedKoan isPassing ifTrue: [^ self successMessage]. 5 | self openedKoan isFailing ifTrue: [^ self failureMessage]. 6 | self openedKoan isErroring ifTrue: [^ self errorMessage]. 7 | ^ '' -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testFailureStatusBar.st: -------------------------------------------------------------------------------- 1 | tests-statusbar 2 | testFailureStatusBar 3 | 4 | editor openKoan: (KoanStep on: KoanMockError selector: #testFailure). 5 | self assert: 'Failure at line 3: self assert: 1 + 1 equals: 3' equals: editor statusBarText -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockFailure.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "resetToState" : "JLO 6/14/2017 16:14" }, 4 | "instance" : { 5 | "testFailure" : "JLO 6/14/2017 16:13", 6 | "testSuccess" : "JLO 6/14/2017 16:13", 7 | "testUntested" : "JLO 6/14/2017 16:13" } } 8 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanTestResultTests.class/instance/testExceptionType.st: -------------------------------------------------------------------------------- 1 | tests 2 | testExceptionType 3 | 4 | | koan testResult | 5 | koan := KoanStep on: KoanMockError selector: #testError. 6 | testResult := koan testResult. 7 | self assert: ZeroDivide equals: testResult exceptionType -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/instance/test05classesHaveAccessToHierachy.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05classesHaveAccessToHierachy 3 | 4 | | aBonsai | 5 | aBonsai := KoanAiderBonsai new. 6 | self assert: xx equals: aBonsai class superclass. 7 | self assert: xx equals: KoanBonsai subclasses -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testBrowseProjectButtonIsEnabled.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testBrowseProjectButtonIsEnabled 3 | 4 | editor := KoanEditor newOnKoan: (KoanStep 5 | on: KoanMockProjectChapter selector: #testNothing). 6 | self assert: editor isBrowseProjectButtonEnabled -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testNoneIcon.st: -------------------------------------------------------------------------------- 1 | tests 2 | testNoneIcon 3 | 4 | | koan | 5 | koan := KoanStep on: KoanMockError selector: #testSuccess. 6 | self clearHistory: koan. 7 | self assert: (Bitmap newFrom: koan icon bits) equals: (Bitmap newFrom: ToolIcons testGray bits) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/README.md: -------------------------------------------------------------------------------- 1 | To solve this final chapter, you will have to apply a lot of the knowledge you have already learned. After finishing this chapter, your path to enlightenment will have reached its end. But your path to perfection will only have just begun... -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/instance/test03nilIsJustAnotherObject.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03nilIsJustAnotherObject 3 | "What is the class of the nil object?" 4 | 5 | self assert: xx equals: nil class 6 | 7 | "But inspect it and you will find nothing. Because nil has no meaning. nil is nil." -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/class/koan09useCascadesToNotRepeatButBeCareful2Success.st: -------------------------------------------------------------------------------- 1 | hints-explanations 2 | koan09useCascadesToNotRepeatButBeCareful2Success 3 | 4 | ^ 'Success! Methods such as #reversed and #asUppercase do not change the original String but instead return a copy.' -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/sourceRangeOfException.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | sourceRangeOfException 3 | 4 | | testContext | 5 | testContext := self testContext. 6 | ^ testContext method debuggerMap 7 | rangeForPC: testContext pc in: testContext method contextIsActiveContext: false -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/testContext.st: -------------------------------------------------------------------------------- 1 | exceptions 2 | testContext 3 | 4 | ^ self exceptionContext 5 | findContextSuchThat: [:context | 6 | context method homeMethod methodHome ~~ TestCase 7 | and: [context method homeMethod methodHome inheritsFrom: TestCase]] 8 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/setUp.st: -------------------------------------------------------------------------------- 1 | running 2 | setUp 3 | 4 | preTestWindows := World submorphs. 5 | browser := KoanBrowser new. 6 | ToolBuilder open: browser. 7 | editor := KoanEditor newOnKoan: (KoanStep on: KoanMockError selector: #testSuccess). 8 | ToolBuilder open: editor -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test02collectionsStartAtFirst.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02collectionsStartAtFirst 3 | 4 | | aCollection | 5 | aCollection := {2 . 3 . 4 . 5}. 6 | self assert: xx equals: aCollection first. 7 | self assert: aCollection first equals: (aCollection at: xx) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test03conditionalExecution.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03conditionalExecution 3 | 4 | | a b | 5 | a := 1. 6 | b := 2. 7 | false 8 | ifTrue: [a := 3] 9 | ifFalse: [b := 3]. 10 | self assert: xx equals: a. 11 | self assert: xx equals: b -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/class/allChapters.st: -------------------------------------------------------------------------------- 1 | accessing 2 | allChapters 3 | 4 | ^ (self allSubclasses sorted: [:first :second | 5 | first priority <= second priority 6 | or: [first priority = second priority 7 | and: [first name <= second name]]]) 8 | reject: [:chapter | chapter isMock] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/statusBarBackgroundColor.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | statusBarBackgroundColor 3 | 4 | self openedKoan isPassing ifTrue: [^ Color green]. 5 | self openedKoan isFailing ifTrue: [^ Color yellow]. 6 | self openedKoan isErroring ifTrue: [^ Color red muchDarker]. 7 | ^ Color white -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/class/allSteps.st: -------------------------------------------------------------------------------- 1 | accessing 2 | allSteps 3 | 4 | | steps | 5 | steps := OrderedCollection new. 6 | KoanChapter allChapters do: [:aChapter | 7 | (aChapter methodsInCategory: 'tests') do: [:aSelector | 8 | steps add: (self on: aChapter selector: aSelector)]]. 9 | ^ steps -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testPreviousButtonBecomesDisabled.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testPreviousButtonBecomesDisabled 3 | 4 | self assert: editor isPreviousButtonEnabled. 5 | editor 6 | previousKoan; 7 | previousKoan; 8 | previousKoan. 9 | self assert: editor isPreviousButtonEnabled not. -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanTestResultTests.class/instance/testExceptionLine.st: -------------------------------------------------------------------------------- 1 | tests 2 | testExceptionLine 3 | 4 | | koan testResult | 5 | koan := KoanStep on: KoanMockError selector: #testError. 6 | testResult := koan testResult. 7 | self assert: 'self assert: 3 / 0 equals: 0' equals: testResult exceptionLine -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanTestResultTests.class/instance/testExceptionMessage.st: -------------------------------------------------------------------------------- 1 | tests 2 | testExceptionMessage 3 | 4 | | koan testResult | 5 | koan := KoanStep on: KoanMockError selector: #testErrorMessage. 6 | testResult := koan testResult. 7 | self assert: 'Error Message' equals: testResult exceptionMessage -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanTestResultTests.class/instance/testLineNumberForExceptions.st: -------------------------------------------------------------------------------- 1 | tests 2 | testLineNumberForExceptions 3 | 4 | | koan testResult | 5 | koan := KoanStep on: KoanMockError selector: #testError. 6 | testResult := koan testResult. 7 | self assert: 4 equals: testResult lineNumberOfException -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/instance/testErroringKoanIsErroringExclusively.st: -------------------------------------------------------------------------------- 1 | tests 2 | testErroringKoanIsErroringExclusively 3 | 4 | | step | 5 | step := KoanStep on: KoanMockError selector: #testError. 6 | self assert: step isErroring. 7 | self deny: step isFailing. 8 | self deny: step isPassing -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/instance/testFailingKoanIsFailingExclusively.st: -------------------------------------------------------------------------------- 1 | tests 2 | testFailingKoanIsFailingExclusively 3 | 4 | | step | 5 | step := KoanStep on: KoanMockFailure selector: #testFailure. 6 | self assert: step isFailing. 7 | self deny: step isErroring. 8 | self deny: step isPassing -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/instance/testPassingKoanIsPassingExclusively.st: -------------------------------------------------------------------------------- 1 | tests 2 | testPassingKoanIsPassingExclusively 3 | 4 | | step | 5 | step := KoanStep on: KoanMockSuccess selector: #testSuccess. 6 | self assert: step isPassing. 7 | self deny: step isErroring. 8 | self deny: step isFailing -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test04select.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04select 3 | 4 | | smallNumbers | 5 | smallNumbers := {1 . 2 . 3 . 4 . 5 . 6}. 6 | self assert: {xx} equals: (smallNumbers select: [:aNumber | aNumber > 3]). 7 | self assert: {2 . 4 . 6} equals: (smallNumbers select: xx) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/instance/test06blocksWithTempVariables.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06blocksWithTempVariables 3 | 4 | | processing | 5 | processing := [:a :b | 6 | | tempVariable | 7 | tempVariable := a + b. 8 | tempVariable * tempVariable]. 9 | self assert: xx equals: (processing value: 4 value: 2) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testChapterListOrderedByPriority.st: -------------------------------------------------------------------------------- 1 | tests-chapterList 2 | testChapterListOrderedByPriority 3 | 4 | | valid | 5 | valid := true. 6 | browser chapterList overlappingPairsDo: [:a :b | 7 | a priority <= b priority ifFalse: [valid := false]]. 8 | self assert: valid 9 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testChangeToSelectionViewClosesOwnWindow.st: -------------------------------------------------------------------------------- 1 | running 2 | testChangeToSelectionViewClosesOwnWindow 3 | 4 | editor changeToSelectionView. 5 | self deny: (self newMorphs anySatisfy: [:morph | 6 | (morph class canUnderstand: #model) 7 | and: [morph model class = KoanEditor]]) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/instance/test07blocksAndConditions.st: -------------------------------------------------------------------------------- 1 | tests 2 | test07blocksAndConditions 3 | "You might have noticed that we use blocks for and: and or:. 4 | Maybe you might want to take a moment to reflect on the reasons for that." 5 | 6 | self assert: xx equals: ((1 + 1 = 2) or: [[1+2] repeat]) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test06setsBiggerBrotherTheBag.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06setsBiggerBrotherTheBag 3 | 4 | | bag | 5 | bag := {'I' . 'am' . 'a' . 'great' . 'bag!'} asBag. 6 | self assert: (bag add: 'a') equals: xx. 7 | self assert: (bag add: 'some') equals: xx. 8 | self assert: bag equals: xx -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test03allSatisfy.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03allSatisfy 3 | 4 | | smallNumbers | 5 | smallNumbers := {1 . 2 . 3 . 4 . 5 . 6}. 6 | self assert: xx equals: (smallNumbers allSatisfy: [:aNumber | aNumber > 3]). 7 | self assert: (smallNumbers allSatisfy: [:aNumber | aNumber > xx]) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test09collect.st: -------------------------------------------------------------------------------- 1 | tests 2 | test09collect 3 | 4 | | smallNumbers | 5 | smallNumbers := {1 . 2 . 3 . 4}. 6 | self assert: {xx} equals: (smallNumbers collect: [:aNumber | aNumber + 10]). 7 | self assert: {false . false . true . true} equals: (smallNumbers collect: xx) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test04everyObjectHasADifferentId.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04everyObjectHasADifferentId 3 | "~~ is true if the objects are not equal." 4 | 5 | | anObject anotherObject | 6 | anObject := Object new. 7 | anotherObject := Object new. 8 | self assert: xx equals: anObject ~~ anotherObject -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test02symbolsCanBeCompared.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02symbolsCanBeCompared 3 | 4 | | symbol1 symbol2 symbol3 | 5 | symbol1 := #aSymbol. 6 | symbol2 := #aSymbol. 7 | symbol3 := #somethingElse. 8 | self assert: xx equals: symbol1 == symbol2. 9 | self assert: xx equals: symbol1 == symbol3 -------------------------------------------------------------------------------- /src/Koans-Core.package/Koans.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Core", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "pre 3/7/2017 11:48", 8 | "instvars" : [ 9 | ], 10 | "name" : "Koans", 11 | "pools" : [ 12 | ], 13 | "super" : "Object", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanTestResultTests.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "testExceptionLine" : "SL 7/15/2017 18:29", 6 | "testExceptionMessage" : "SL 7/15/2017 18:57", 7 | "testExceptionType" : "SL 7/15/2017 18:41", 8 | "testLineNumberForExceptions" : "SL 7/15/2017 18:06" } } 9 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoansTests.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoansTests", 11 | "pools" : [ 12 | ], 13 | "super" : "TestCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # changes file 2 | *.changes 3 | 4 | # system image 5 | *.image 6 | 7 | # Pharo Smalltalk Debug log file 8 | PharoDebug.log 9 | 10 | # Squeak Smalltalk Debug log file 11 | SqueakDebug.log 12 | 13 | # Monticello package cache 14 | /package-cache 15 | 16 | # Metacello-github cache 17 | /github-cache 18 | github-*.zip 19 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/instance/test04useGettersAndSetters.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04useGettersAndSetters 3 | 4 | | aLotus | 5 | aLotus := KoanLotus new. 6 | self assert: xx equals: aLotus publicInstanceVariable. 7 | aLotus publicInstanceVariable: 'anotherValue'. 8 | self assert: xx equals: aLotus publicInstanceVariable -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test07useCascadesToNotRepeat.st: -------------------------------------------------------------------------------- 1 | tests 2 | test07useCascadesToNotRepeat 3 | 4 | "Use cascades to send multiple messages to one object" 5 | | result | 6 | result := Morph new 7 | extent: 20@20; 8 | color: Color red; 9 | lock. 10 | self assert: xx equals: result color -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testPreviousButtonBecomesEnabled.st: -------------------------------------------------------------------------------- 1 | tests-ui 2 | testPreviousButtonBecomesEnabled 3 | 4 | editor 5 | previousKoan; 6 | previousKoan; 7 | previousKoan. 8 | self assert: editor isPreviousButtonEnabled not. 9 | editor nextKoan. 10 | self assert: editor isPreviousButtonEnabled -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanStepTests", 11 | "pools" : [ 12 | ], 13 | "super" : "TestCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/instance/test04aBetterWayOfAssertingEquality.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04aBetterWayOfAssertingEquality 3 | "Some ways of asserting equality are better than others." 4 | 5 | | expectedValue actualValue | 6 | expectedValue := xx. 7 | actualValue := 1 + 1. 8 | self assert: expectedValue equals: actualValue -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test11sizeAndCount.st: -------------------------------------------------------------------------------- 1 | tests 2 | test11sizeAndCount 3 | 4 | | words | 5 | words := {'Some' . 'single' . 'words'}. 6 | self assert: xx equals: words size. 7 | self assert: xx equals: (words count: [:aWord | aWord size = 4]). 8 | self assert: 2 equals: (words count: [:aWord | xx]) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/instance/test05youCanRollDifferentNumbersOfDice.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05youCanRollDifferentNumbersOfDice 3 | 4 | | dice | 5 | dice := KoanCrystalDice newWithRange: 1 to: 6. 6 | dice roll: 3. 7 | self assert: 3 equals: dice values size. 8 | dice roll: 1. 9 | self assert: 1 equals: dice values size -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanCrystalDice.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanCrystalDice", 11 | "pools" : [ 12 | ], 13 | "super" : "Object", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/tooltipFor..st: -------------------------------------------------------------------------------- 1 | ui 2 | tooltipFor: aChapter 3 | 4 | | tooltip | 5 | aChapter requirements 6 | ifNotEmpty: [tooltip := aChapter requirements 7 | inject: 'You should do the following Chapters first:' 8 | into: [:string :chapter | string , ' ', chapter asString]]. 9 | ^ tooltip 10 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanChapterTests", 11 | "pools" : [ 12 | ], 13 | "super" : "TestCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockCase.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockCase", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProject.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockProject", 11 | "pools" : [ 12 | ], 13 | "super" : "Object", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters-Bonsai", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "height" ], 10 | "name" : "KoanBonsai", 11 | "pools" : [ 12 | ], 13 | "super" : "Object", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/instance/correctPairs.st: -------------------------------------------------------------------------------- 1 | constants 2 | correctPairs 3 | 4 | ^ Dictionary newFromPairs: { 5 | KoanMockEmpty. #testGray. 6 | KoanMockError. #testRed. 7 | KoanMockFailure. #testOrange. 8 | KoanMockPartialSuccess. #testGreen. 9 | KoanMockUnchanged. #testGray. 10 | KoanMockSuccess. #testGreen} -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockEmpty.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockEmpty", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockError", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanTestResultTests.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanTestResultTests", 11 | "pools" : [ 12 | ], 13 | "super" : "TestCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/BaselineOfKoans.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "BaselineOfKoans", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "BaselineOfKoans", 11 | "pools" : [ 12 | ], 13 | "super" : "BaselineOf", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Core", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "JE 8/2/2017 13:58", 8 | "instvars" : [ 9 | "xx" ], 10 | "name" : "KoanChapter", 11 | "pools" : [ 12 | ], 13 | "super" : "TestCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockFailure.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockFailure", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockSuccess.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockSuccess", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockUnchanged.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockUnchanged", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockVersions.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockVersions", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/instance/testAttemptsIncreaseWithEachTest.st: -------------------------------------------------------------------------------- 1 | tests 2 | testAttemptsIncreaseWithEachTest 3 | 4 | | step | 5 | step := KoanStep on: KoanMockSuccess selector: #testSuccess. 6 | self assert: 0 equals: step attempts. 7 | step 8 | newTestResult; 9 | newTestResult. 10 | self assert: 2 equals: step attempts -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test05reject.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05reject 3 | 4 | | smallNumbers | 5 | smallNumbers := {1 . 2 . 3 . 4 . 5 . 6}. 6 | "You have previously learned about the power of select. 7 | Now what might be its counterpart?" 8 | self assert: {1 . 2 . 3} equals: (smallNumbers xx: [:aNumber | aNumber > 3] ) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAiderBonsai.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters-Bonsai", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAiderBonsai", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanBonsai", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMapleBonsai.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters-Bonsai", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMapleBonsai", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanBonsai", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanMetaBonsai.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters-Bonsai", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "height" ], 10 | "name" : "KoanMetaBonsai", 11 | "pools" : [ 12 | ], 13 | "super" : "Object", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test02anySatisfy.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02anySatisfy 3 | 4 | | smallNumbers | 5 | smallNumbers := {1 . 2 . 3 . 4 . 5 . 6}. 6 | self assert: xx equals: (smallNumbers anySatisfy: [:aNumber | aNumber > 3]). 7 | self assert: false equals: (smallNumbers anySatisfy: [:aNumber | (aNumber raisedTo: 2) > xx]) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 11:14", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutNil", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test05butNotSmallIntegers.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05butNotSmallIntegers 3 | "Now think about this: What is the implication for the result of the 4 | identity check on small integers?" 5 | 6 | | aNumber anotherNumber | 7 | aNumber := 1. 8 | anotherNumber := 1. 9 | self assert: xx equals: aNumber ~~ anotherNumber -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/instance/test01trueAndFalseAreObjects.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01trueAndFalseAreObjects 3 | 4 | self assert: xx equals: true class. 5 | self assert: xx equals: (true class allSuperclasses includes: Object). 6 | self assert: xx equals: false class. 7 | self assert: xx equals: (false class allSuperclasses includes: Object) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBambooBonsai.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters-Bonsai", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "height" ], 10 | "name" : "KoanBambooBonsai", 11 | "pools" : [ 12 | ], 13 | "super" : "Object", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/instance/testBrowseButtonOpensCorrectClasses.st: -------------------------------------------------------------------------------- 1 | tests 2 | testBrowseButtonOpensCorrectClasses 3 | 4 | | projectBrowser | 5 | browser selectChapter: KoanMockProjectChapter. 6 | projectBrowser := browser browseProject. 7 | self assert: {#KoanMockProject} equals: projectBrowser classList. 8 | projectBrowser changed: #close -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | "WasDebugged" ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "var" ], 10 | "name" : "KoanMockDebug", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockPartialSuccess.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockPartialSuccess", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockProjectChapter.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockProjectChapter", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockRequirements.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests-Mocks", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanMockRequirements", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanMockCase", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "JE 8/4/2017 13:51", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutAsserts", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "SL 7/13/2017 18:11", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutBlocks", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test04orderedCollection.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04orderedCollection 3 | 4 | | collection | 5 | collection := {'I' . 'am' . 'an' . 'ordered' . 'collection!'} asOrderedCollection. 6 | self assert: {'ordered' . 'collection!' . 'an' . 'am' . 'I'} asOrderedCollection 7 | equals: (collection sorted: [:a :b | xx]) 8 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test07dictionary.st: -------------------------------------------------------------------------------- 1 | tests 2 | test07dictionary 3 | 4 | | dict | 5 | dict := Dictionary new 6 | at: #key put: 'aValue' ; 7 | at: #anotherKey put: 'aSecondValue'; 8 | yourself. 9 | self assert: (dict at: xx) equals: 'aSecondValue'. 10 | self assert: xx equals: (dict associationAt: #key) class -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test06implication.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06implication 3 | 4 | | a | 5 | self assert: xx equals: true ==> [false]. 6 | self assert: xx equals: false ==> [false]. 7 | a := 1. 8 | true ==> [a := 2]. 9 | self assert: xx equals: a. 10 | a := 1. 11 | false ==> [a := 2]. 12 | self assert: xx equals: a -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/instance/test03abstractMethodsAreSubclassResponsibility.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03abstractMethodsAreSubclassResponsibility 3 | 4 | | aBonsai anAiderBonsai | 5 | aBonsai := KoanBonsai new. 6 | anAiderBonsai := KoanAiderBonsai new. 7 | self should: [aBonsai fruits] raise: xx. 8 | self assert: xx equals: anAiderBonsai fruits -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 11:14", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutMeta", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "SL 7/13/2017 18:05", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutStrings", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/icon.st: -------------------------------------------------------------------------------- 1 | sunit 2 | icon 3 | 4 | | iconOrSymbol | 5 | "The following is a compatibility implementation to allow for ToolIconsPlus --pre" 6 | iconOrSymbol := ToolIcons iconForClass: self chapter selector: self selector. 7 | ^ iconOrSymbol isSymbol 8 | ifTrue: [ToolIcons iconNamed: iconOrSymbol] 9 | ifFalse: [iconOrSymbol] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/instance/newTestResult.st: -------------------------------------------------------------------------------- 1 | sunit 2 | newTestResult 3 | 4 | | testResult testSuite | 5 | testSuite := self createTestSuite. 6 | testResult := KoanTestResult new. 7 | testSuite run: testResult. 8 | self attempts: self attempts + 1. 9 | testResult updateResultsInHistory. 10 | self saveTestResult: testResult. 11 | ^ testResult -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testChangeToSelectionViewOpensAWindowWithAKoanBrowserAsModel.st: -------------------------------------------------------------------------------- 1 | running 2 | testChangeToSelectionViewOpensAWindowWithAKoanBrowserAsModel 3 | 4 | editor changeToSelectionView. 5 | self assert: (self newMorphs anySatisfy: [:morph | 6 | (morph class canUnderstand: #model) 7 | ifTrue:[morph model class = KoanBrowser]]) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testDebuggerIsOpenedWhenDebugButtonIsClicked.st: -------------------------------------------------------------------------------- 1 | running 2 | testDebuggerIsOpenedWhenDebugButtonIsClicked 3 | 4 | editor openedKoan: (KoanStep on: KoanMockDebug selector: #test01). 5 | KoanMockDebug wasDebugged: false. 6 | editor debugKoan. 7 | self assert: KoanMockDebug wasDebugged. 8 | KoanMockDebug wasDebugged: false -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 09:11", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutClasses", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 08:46", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutObjects", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 11:41", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutSymbols", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "toolbuilder", 10 | "browser" ], 11 | "name" : "KoanBrowserTests", 12 | "pools" : [ 13 | ], 14 | "super" : "TestCase", 15 | "type" : "normal" } 16 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testChangeToEditorViewClosesOwnWindow.st: -------------------------------------------------------------------------------- 1 | running 2 | testChangeToEditorViewClosesOwnWindow 3 | 4 | browser changeToEditorViewOn: (KoanStep on: KoanMockError selector: #testSuccess). 5 | self deny: (self newMorphs anySatisfy: [:morph | 6 | (morph class canUnderstand: #model) 7 | ifTrue:[morph model class = KoanBrowser]]) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testErrorIcon.st: -------------------------------------------------------------------------------- 1 | tests 2 | testErrorIcon 3 | 4 | | koan | 5 | koan := KoanStep on: KoanMockError selector: #testError. 6 | self clearHistory: koan. 7 | ((TestResult historyFor: koan chapter) at: #errors) add: koan selector. 8 | self assert: (Bitmap newFrom: koan icon bits) equals: (Bitmap newFrom: ToolIcons testRed bits) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testPassIcon.st: -------------------------------------------------------------------------------- 1 | tests 2 | testPassIcon 3 | 4 | | koan | 5 | koan := KoanStep on: KoanMockError selector: #testSuccess. 6 | self clearHistory: koan. 7 | ((TestResult historyFor: koan chapter) at: #passed) add: koan selector. 8 | self assert: (Bitmap newFrom: koan icon bits) equals: (Bitmap newFrom: ToolIcons testGreen bits) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 09:45", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutCollections", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 09:51", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutDiceProject", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "pre 10/15/2017 10:26", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutInheritance", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockDebug.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "wasDebugged" : "rhi 10/12/2017 13:01", 4 | "wasDebugged:" : "rhi 10/12/2017 13:01" }, 5 | "instance" : { 6 | "debugAsFailure" : "mt 10/25/2022 15:52", 7 | "setUp" : "rhi 10/12/2017 13:03", 8 | "tearDown" : "rhi 10/12/2017 13:03", 9 | "test01" : "rhi 10/12/2017 13:03" } } 10 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testFailIcon.st: -------------------------------------------------------------------------------- 1 | tests 2 | testFailIcon 3 | 4 | | koan | 5 | koan := KoanStep on: KoanMockError selector: #testFailure. 6 | self clearHistory: koan. 7 | ((TestResult historyFor: koan chapter) at: #failures) add: koan selector. 8 | self assert: (Bitmap newFrom: koan icon bits) equals: (Bitmap newFrom: ToolIcons testOrange bits) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/instance/test05createStringsWithFormat.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05createStringsWithFormat 3 | 4 | | a b c | 5 | a := 'Hello World'. 6 | b := '{ } \ foo 12 bar string'. 7 | c := '{ } \\ foo 12 bar string'. 8 | self assert: xx equals: ('Hello {1}' format: {'World'}). 9 | self assert: xx equals: ('\{ \} \\ foo {1} bar {2}' format: {12. 'string'}) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 11:42", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutTrueAndFalse", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanBonsai.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "color" : "JLO 8/4/2017 14:31", 6 | "fruits" : "rhi 10/12/2017 11:53", 7 | "height" : "rhi 10/12/2017 11:53", 8 | "height:" : "rhi 10/12/2017 11:54", 9 | "initialize" : "pre 10/16/2011 16:40:51.014", 10 | "width" : "pre 10/16/2011 16:55:14.152" } } 11 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Core", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "JE 8/2/2017 13:56", 8 | "instvars" : [ 9 | "selectedKoan", 10 | "selectedChapter" ], 11 | "name" : "KoanBrowser", 12 | "pools" : [ 13 | ], 14 | "super" : "Model", 15 | "type" : "normal" } 16 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/failureMessage.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | failureMessage 3 | 4 | | testResult | 5 | testResult := self openedKoan testResult. 6 | ^ String streamContents: [:stream | 7 | stream 8 | nextPutAll: 'Failure at line '; 9 | print: testResult lineNumberOfException; 10 | nextPut: $:; tab; 11 | nextPutAll: testResult exceptionLine] -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "preTestWindows", 10 | "browser", 11 | "editor" ], 12 | "name" : "KoanUITests", 13 | "pools" : [ 14 | ], 15 | "super" : "TestCase", 16 | "type" : "normal" } 17 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/instance/test03assertReality.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03assertReality 3 | "To understand reality, we must compare our expectations against reality." 4 | 5 | | expectedValue actualValue | 6 | "Wherever you see an xx: Replace it with your expectation!" 7 | expectedValue := xx. 8 | actualValue := 1 + 1. 9 | self assert: expectedValue = actualValue -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "SL 7/13/2017 18:14", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutControlStatements", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/instance/test03diceValuesDoNotChangeUnlessExplicitlyRolled.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03diceValuesDoNotChangeUnlessExplicitlyRolled 3 | 4 | | dice firstTime secondTime | 5 | dice := KoanCrystalDice newWithRange: 1 to: 6. 6 | dice roll: 5. 7 | firstTime := dice values. 8 | secondTime := dice values. 9 | self assert: firstTime equals: secondTime -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Tests", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "editor", 10 | "toolbuilder", 11 | "koan" ], 12 | "name" : "KoanEditorTests", 13 | "pools" : [ 14 | ], 15 | "super" : "TestCase", 16 | "type" : "normal" } 17 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanMockError.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "resetToState" : "JLO 6/14/2017 16:12" }, 4 | "instance" : { 5 | "testError" : "JLO 6/14/2017 15:51", 6 | "testErrorMessage" : "SL 7/15/2017 18:52", 7 | "testFailure" : "JLO 6/14/2017 15:52", 8 | "testSuccess" : "JLO 6/14/2017 15:51", 9 | "testUntested" : "JLO 6/14/2017 15:52" } } 10 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "rhi 10/12/2017 09:16", 8 | "instvars" : [ 9 | ], 10 | "name" : "KoanAboutCollectionProtocol", 11 | "pools" : [ 12 | ], 13 | "super" : "KoanChapter", 14 | "type" : "normal" } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanLotus.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Chapters", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "", 8 | "instvars" : [ 9 | "privateInstanceVariable", 10 | "publicInstanceVariable" ], 11 | "name" : "KoanLotus", 12 | "pools" : [ 13 | ], 14 | "super" : "Object", 15 | "type" : "normal" } 16 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Core", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "JE 8/2/2017 14:02", 8 | "instvars" : [ 9 | "exceptions", 10 | "creationTime" ], 11 | "name" : "KoanTestResult", 12 | "pools" : [ 13 | ], 14 | "super" : "TestResult", 15 | "type" : "normal" } 16 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/buildBrowserWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildBrowserWith: aBuilder 3 | 4 | ^ (self browser buildCodePaneWith: aBuilder) 5 | frame: (LayoutFrame new 6 | leftFraction: 0 offset: 0; 7 | topFraction: 0 offset: self statusBarHeight ; 8 | rightFraction: 1 offset: 0; 9 | bottomFraction: 1 offset: self class buttonHeight negated); 10 | yourself -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/onSave..st: -------------------------------------------------------------------------------- 1 | test 2 | onSave: aModifiedEvent 3 | 4 | | method koan | 5 | self openedKoan ifNil: [^ self]. 6 | method := aModifiedEvent item. 7 | koan := KoanStep on: method methodClass selector: method selector. 8 | (koan = self openedKoan 9 | or: [self openedChapter requiredClasses includes: method methodClass]) 10 | ifTrue: [self test] -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test01everythingIsAnObject.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01everythingIsAnObject 3 | 4 | self assert: xx equals: (21 isKindOf: Object). 5 | self assert: xx equals: (1.321 isKindOf: Object). 6 | self assert: xx equals: ('string' isKindOf: Object). 7 | self assert: xx equals: (Object new isKindOf: Object). 8 | self assert: xx equals: (Smalltalk isKindOf: Object) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/instance/test01stringsAreCollections.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01stringsAreCollections 3 | 4 | self assert: xx equals: ('Hello World' isKindOf: Collection). 5 | self assert: xx equals: 'Hello World' first. 6 | self assert: xx equals: ('Hello World' at: 6). 7 | self assert: xx equals: ('Hello World' copyFrom: 5 to: 7). 8 | self assert: xx equals: ('Hello World' last: 5) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/buildWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildWith: aBuilder 3 | 4 | ^ aBuilder build: (aBuilder pluggableWindowSpec new 5 | model: self; 6 | label: #windowTitle; 7 | extent: self class defaultExtent; 8 | children: { 9 | self buildStatusBarWith: aBuilder. 10 | self buildBrowserWith: aBuilder. 11 | self buildButtonBarWith: aBuilder }; 12 | yourself) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Core", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | "TestOnSave" ], 7 | "commentStamp" : "SL 8/3/2017 22:31", 8 | "instvars" : [ 9 | "openedKoan", 10 | "browser", 11 | "testOnSave" ], 12 | "name" : "KoanEditor", 13 | "pools" : [ 14 | ], 15 | "super" : "Model", 16 | "type" : "normal" } 17 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test08loopsOperateOnBlocks.st: -------------------------------------------------------------------------------- 1 | tests 2 | test08loopsOperateOnBlocks 3 | 4 | self assert: xx equals: (Boolean canUnderstand: #whileTrue:). 5 | self assert: xx equals: (BlockClosure canUnderstand: #whileTrue:). 6 | self assert: xx equals: (BlockClosure canUnderstand: #whileFalse:). 7 | self assert: xx equals: (BlockClosure canUnderstand: #whileNil:) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/errorMessage.st: -------------------------------------------------------------------------------- 1 | statusbar 2 | errorMessage 3 | 4 | | testResult | 5 | testResult := self openedKoan testResult. 6 | ^ String streamContents: [:stream | 7 | stream 8 | print: testResult exceptionType; 9 | nextPutAll: ' at line '; 10 | print: testResult lineNumberOfException; 11 | nextPut: $:; tab; 12 | nextPutAll: testResult exceptionLine] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/windowTitle.st: -------------------------------------------------------------------------------- 1 | building 2 | windowTitle 3 | 4 | ^ String streamContents: [:stream | 5 | stream nextPutAll: self class defaultWindowTitle. 6 | self openedKoan ifNotNil: [ 7 | stream 8 | nextPut: $:; space; 9 | nextPutAll: self openedKoan chapter name; 10 | space; nextPut: $(; 11 | nextPutAll: self openedKoan selector; 12 | nextPut: $)]] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/storeException.for..st: -------------------------------------------------------------------------------- 1 | running 2 | storeException: ex for: aTestCase 3 | "We have to copy the stack of the signaler context to preserve it 4 | for future inspection (as the original context will be resumed)" 5 | 6 | | store | 7 | store := ex copy. 8 | store searchFrom: ex signalerContext copyStack. 9 | self exceptions at: aTestCase put: store 10 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/instance/testChangeToEditorViewOpensAWindowWithAKoanEditorAsModel.st: -------------------------------------------------------------------------------- 1 | running 2 | testChangeToEditorViewOpensAWindowWithAKoanEditorAsModel 3 | 4 | browser changeToEditorViewOn: (KoanStep on: KoanMockError selector: #testSuccess). 5 | self assert: (self newMorphs anySatisfy: [:morph | 6 | (morph class canUnderstand: #model) 7 | ifTrue:[morph model class = KoanEditor]]) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/instance/test04classesAreObjectsAndHaveClassesHaveClasses.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04classesAreObjectsAndHaveClassesHaveClasses 3 | 4 | | anObject | 5 | anObject := Object new. 6 | self assert: xx equals: anObject class. 7 | self assert: xx equals: anObject class class. 8 | self assert: xx equals: anObject class class class. 9 | self assert: xx equals: anObject class class class class -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/instance/test03concatenationConnectsHelloAndWorld.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03concatenationConnectsHelloAndWorld 3 | 4 | | a b | 5 | a := 'Hello World'. 6 | self assert: xx equals: 'Hello' , ' ' , 'World'. 7 | b := String streamContents: [:stream | 8 | stream 9 | nextPutAll: 'Hello'; 10 | nextPutAll: ' '; 11 | nextPutAll: 'World']. 12 | self assert: xx equals: b -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/instance/test03casesByMessageNames.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03casesByMessageNames 3 | "You know how this works. But use it wisely. This can lead you to the 4 | dark side of programming, where debugging is merely a hunt for 5 | ghosts in a bamboo garden." 6 | 7 | | aBonsai | 8 | aBonsai := KoanMetaBonsai new. 9 | self assert: 'fruit 2' equals: (aBonsai perform: (('fruit', xx asString) xx )) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/instance/test03theTaleOfNewAndBasicNew.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03theTaleOfNewAndBasicNew 3 | 4 | | aLotus | 5 | "The new class method calls initialize on the new instance." 6 | aLotus := KoanLotus new. 7 | self assert: xx equals: aLotus publicInstanceVariable. 8 | "basicNew doesn't call it" 9 | aLotus := KoanLotus basicNew. 10 | self assert: xx equals: aLotus publicInstanceVariable -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test08detectIfNone.st: -------------------------------------------------------------------------------- 1 | tests 2 | test08detectIfNone 3 | 4 | | smallNumbers | 5 | smallNumbers := {1 . 2 . 3 . 4}. 6 | self assert: xx equals: (smallNumbers detect: [:aNumber | aNumber < 0] ifNone: [10]). 7 | self assert: xx equals: (smallNumbers detect: [:aNumber | aNumber < 2] ifNone: [10]). 8 | self assert: {22 . 31} equals: (smallNumbers detect: xx ifNone: xx) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test09sortedCollection.st: -------------------------------------------------------------------------------- 1 | tests 2 | test09sortedCollection 3 | 4 | | numbers sortNumbers | 5 | numbers := {5 . 3 . 2}. 6 | self assert: xx equals: (numbers asSortedCollection asArray). 7 | sortNumbers := {6 . 7 . 3 . 2} asSortedCollection. 8 | self assert: ((sortNumbers sort: xx) asArray) equals: {7 . 6 . 3 . 2}. 9 | self assert: (sortNumbers add: 5; asArray) equals: xx -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test02statementsTakeBlocks.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02statementsTakeBlocks 3 | "All statements take blocks as arguments. 4 | the blocks will only be evaluated when necessary." 5 | 6 | | a b | 7 | a := 1. 8 | b := 2. 9 | true or: [a := b. true]. 10 | self assert: xx equals: a. 11 | a := 1. 12 | b := 2. 13 | false or: [a := b. true]. 14 | self assert: xx equals: a -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/instance/test04diceValuesShouldChangeBetweenRolls.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04diceValuesShouldChangeBetweenRolls 3 | 4 | | dice firstTime secondTime | 5 | dice := KoanCrystalDice newWithRange: 1 to: 6. 6 | dice roll: 5. 7 | firstTime := dice values. 8 | dice roll: 5. 9 | secondTime := dice values. 10 | "Two rolls should not be equal." 11 | self assert: (firstTime = secondTime) not -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanStep.class/properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "category" : "Koans-Core", 3 | "classinstvars" : [ 4 | ], 5 | "classvars" : [ 6 | ], 7 | "commentStamp" : "SL 6/19/2017 18:08", 8 | "instvars" : [ 9 | "selector", 10 | "chapter", 11 | "attempts", 12 | "oldCompiledMethod", 13 | "oldTestResult" ], 14 | "name" : "KoanStep", 15 | "pools" : [ 16 | ], 17 | "super" : "Object", 18 | "type" : "normal" } 19 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanEditorTests.class/instance/testBrowseProjectButtonOpensBrowserOnCorrectClasses.st: -------------------------------------------------------------------------------- 1 | tests 2 | testBrowseProjectButtonOpensBrowserOnCorrectClasses 3 | 4 | | browser koan | 5 | koan := KoanStep on: KoanMockProjectChapter selector: #testNothing. 6 | editor := KoanEditor newOnKoan: koan. 7 | browser := editor browseProject. 8 | self assert: {#KoanMockProject} equals: browser classList. 9 | browser changed: #close -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "testAttemptsIncreaseWithEachTest" : "rhi 10/12/2017 12:55", 6 | "testErroringKoanIsErroringExclusively" : "SL 7/15/2017 17:15", 7 | "testFailingKoanIsFailingExclusively" : "SL 7/15/2017 17:15", 8 | "testPassingKoanIsPassingExclusively" : "SL 7/15/2017 17:16", 9 | "testReset" : "rhi 10/12/2017 12:56" } } 10 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test06mathStuff.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06mathStuff 3 | "Collections have some convenience functions for mathematical operations." 4 | 5 | | smallNumbers | 6 | smallNumbers := {2 . 3}. 7 | self assert: xx equals: (smallNumbers sum). 8 | self assert: xx equals: (smallNumbers max). 9 | self assert: xx equals: (smallNumbers range). 10 | self assert: xx equals: (smallNumbers squared) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/buildKoanListWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildKoanListWith: aBuilder 3 | 4 | ^ aBuilder pluggableListSpec new 5 | model: self; 6 | getSelected: #selectedKoan; 7 | setSelected: #selectKoan:; 8 | icon: #koanIconAt:; 9 | list: #koanList; 10 | autoDeselect: false; 11 | frame: (LayoutFrame new 12 | leftFraction: 0.38; 13 | topFraction: 0.38; 14 | rightFraction: 1; 15 | bottomFraction: 1) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/buildWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildWith: aBuilder 3 | 4 | ^ aBuilder build: (aBuilder pluggableWindowSpec new 5 | model: self; 6 | label: #labelString; 7 | extent: self class defaultExtent; 8 | children: { 9 | self buildChapterListWith: aBuilder. 10 | self buildKoanListWith: aBuilder. 11 | self buildDescriptionBoxWith: aBuilder. 12 | self buildBrowseButtonWith: aBuilder}; 13 | yourself) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutTrueAndFalse.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "rhi 10/12/2017 11:50", 4 | "requirements" : "rhi 10/12/2017 11:50" }, 5 | "instance" : { 6 | "test01trueAndFalseAreObjects" : "rhi 10/12/2017 11:42", 7 | "test02andIsAMessageOfBoolean" : "rhi 10/12/2017 11:43", 8 | "test03orIsAMessageOfBoolean" : "rhi 10/12/2017 11:43", 9 | "test04alsoNotAndImplies" : "rhi 10/12/2017 11:43" } } 10 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/instance/test02methodInheritanceAndOverridingExist.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02methodInheritanceAndOverridingExist 3 | 4 | | aBonsai aMapleBonsai anAiderBonsai | 5 | aBonsai := KoanBonsai new. 6 | anAiderBonsai := KoanAiderBonsai new. 7 | aMapleBonsai := KoanMapleBonsai new. 8 | self assert: xx equals: aBonsai color. 9 | self assert: xx equals: anAiderBonsai color. 10 | self assert: xx equals: aMapleBonsai color -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/instance/test04methodNamesBecomeSymbols.st: -------------------------------------------------------------------------------- 1 | tests 2 | test04methodNamesBecomeSymbols 3 | "If you want to crack a hard nut, think about this: Why do we compare 4 | against the string value rather than against the symbol itself? 5 | Hint: How is the set of all symbols affected when you change the 6 | source code to use symbols?" 7 | 8 | self assert: xx 9 | equals: (Symbol allSymbols includes: 'test04methodNamesBecomeSymbols') -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test13specialIterators.st: -------------------------------------------------------------------------------- 1 | tests 2 | test13specialIterators 3 | "Some collections have special iterators in their art of iteration." 4 | 5 | self assert: xx equals: (Dictionary canUnderstand: #keysAndValuesDo:). 6 | self assert: xx equals: (Dictionary canUnderstand: #associationsDo:). 7 | self assert: xx equals: (String canUnderstand: #wordsDo:). 8 | self assert: xx equals: (Matrix canUnderstand: #indicesCollect:) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test10inject.st: -------------------------------------------------------------------------------- 1 | tests 2 | test10inject 3 | 4 | | words | 5 | words := {'Some' . 'single' . 'words'}. 6 | self assert: xx 7 | equals: (words inject: '' into: [:totalString :value | totalString , value]). 8 | self assert: 'TheseSomesinglewords' 9 | equals: (words inject: xx into: [:totalString :value | totalString , value]). 10 | self assert: ' Some single words' 11 | equals: (words inject: xx into: xx) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/changeToSelectionView.st: -------------------------------------------------------------------------------- 1 | ui 2 | changeToSelectionView 3 | 4 | | window currentBounds | 5 | currentBounds := ToolBuilder findDefault getBoundsForWindow: self containingWindow. 6 | "Close first because MVC fiddles around with processes." 7 | self closeOpenedWindow. 8 | window := KoanBrowser open. 9 | "---- In MVC, the lines after this will not be executed ---" 10 | ToolBuilder findDefault setBoundsForWindow: window to: currentBounds -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/changeToEditorViewOn..st: -------------------------------------------------------------------------------- 1 | ui 2 | changeToEditorViewOn: aKoan 3 | 4 | | window currentBounds | 5 | currentBounds := ToolBuilder findDefault getBoundsForWindow: self containingWindow. 6 | "Close first because MVC fiddles around with processes." 7 | self closeOpenedWindow. 8 | window := aKoan openEditor. 9 | "---- In MVC, the lines after this will not be executed ---" 10 | ToolBuilder findDefault setBoundsForWindow: window to: currentBounds -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/buildBrowseButtonWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildBrowseButtonWith: aBuilder 3 | 4 | ^ aBuilder pluggableButtonSpec new 5 | model: self; 6 | label: 'Browse Project'; 7 | enabled: #isProjectChapter; 8 | action: #browseProject; 9 | frame: (LayoutFrame new 10 | leftFraction: 0.38 offset: 0; 11 | topFraction: 0.38 offset: ToolBuilder default buttonRowHeight negated; 12 | rightFraction: 1 offset: 0; 13 | bottomFraction: 0.38 offset: 0) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/instance/test05passParametersToBlocksButPassTheRight.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05passParametersToBlocksButPassTheRight 3 | "Remember the ancient button of 'debug'. 4 | You can also select and do it / print it code in all text windows, including the Workspace and this one (But keep self in mind in this case)" 5 | 6 | | multiply | 7 | multiply := [:a :b | a * b]. 8 | self assert: xx equals: (multiply value: 2 value: 3). 9 | self should: [multiply value: 1] raise: xx -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/buildChapterListWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildChapterListWith: aBuilder 3 | 4 | ^ aBuilder pluggableListSpec new 5 | model: self; 6 | getSelected: #selectedChapter; 7 | setSelected: #selectChapter:; 8 | list: #chapterList; 9 | icon: #chapterIconAt:; 10 | autoDeselect: false; 11 | helpItem: #chapterTooltipFor:; 12 | frame: (LayoutFrame new 13 | leftFraction: 0; 14 | topFraction: 0; 15 | rightFraction: 0.38; 16 | bottomFraction: 1) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "koan01assertTruthSuccess" : "ek 6/14/2023 10:42", 4 | "priority" : "rhi 10/12/2017 11:44" }, 5 | "instance" : { 6 | "test01assertTruth" : "rhi 10/12/2017 09:37", 7 | "test02assertWithDescription" : "rhi 10/12/2017 08:34", 8 | "test03assertReality" : "rhi 10/12/2017 09:36", 9 | "test04aBetterWayOfAssertingEquality" : "esec 10/18/2011 11:19:14.537", 10 | "test05fillInValues" : "ek 6/14/2023 09:53" } } 11 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutNil.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "countAllInstancesOfNil" : "rhi 10/12/2017 11:48", 4 | "numberOfAllInstancesOfNil" : "esec 11/9/2011 10:51:21.456", 5 | "priority" : "rhi 10/12/2017 11:48", 6 | "requirements" : "rhi 10/12/2017 11:49" }, 7 | "instance" : { 8 | "test01thereIsOnlyOneNil" : "ek 6/14/2023 11:18", 9 | "test02variablesAreInitializedToNil" : "ek 6/14/2023 11:17", 10 | "test03nilIsJustAnotherObject" : "ek 6/14/2023 11:18" } } 11 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test08useCascadesToNotRepeatButBeCareful1.st: -------------------------------------------------------------------------------- 1 | tests 2 | test08useCascadesToNotRepeatButBeCareful1 3 | 4 | "Cascades always return the result of the last method that was called on the object. Be careful: This might not be what you expect. 5 | 6 | Remember the ancient button of implementors: It might reveal the secrets of #add: for a Set" 7 | 8 | | result | 9 | result := Set new 10 | add: 1; 11 | add: 2. 12 | self assert: xx equals: result isCollection -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test09useCascadesToNotRepeatButBeCareful2.st: -------------------------------------------------------------------------------- 1 | tests 2 | test09useCascadesToNotRepeatButBeCareful2 3 | 4 | "Cascades always return the result of the last method that was called on the object. Be careful: This might not be what you expect. 5 | 6 | Remember the ancient button of implementors: It might reveal the secrets of #asUppercase for a String" 7 | 8 | | result | 9 | result := 'abc' 10 | reversed; 11 | asUppercase. 12 | self assert: xx equals: result -------------------------------------------------------------------------------- /.smalltalk.ston: -------------------------------------------------------------------------------- 1 | SmalltalkCISpec { 2 | #loading : [ 3 | SCIMetacelloLoadSpec { 4 | #baseline : 'Koans', 5 | #directory : 'src', 6 | #onWarningLog : true, 7 | #useLatestMetacello : false, 8 | #load : [ 'CompleteWithTests' ], 9 | #platforms : [ #squeak ] 10 | } 11 | ], 12 | #testing : { 13 | #categories : [ 'Koans-Tests' ], 14 | #failOnZeroTests : true, 15 | #hidePassingTests : true, 16 | #defaultTimeout : 30, 17 | #coverage: { 18 | #categories : [ 'Koans-Core' ] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/instance/test01AboutDiceProject.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01AboutDiceProject 3 | "As you can see in the assert Statement, we expect dice to understand 4 | and respond to the message #roll:. This means an object of the class KoanCrystalDice 5 | has to have a method called 'roll:'. Hence such a message does not exist yet, 6 | I have to set my faith in you to make the dice finally understand." 7 | 8 | | dice | 9 | dice := KoanCrystalDice new. 10 | self assert: (dice respondsTo: #roll:) -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanChapterTests.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "correctPairs" : "rhi 10/12/2017 12:48", 6 | "testChapterColor" : "JLO 7/20/2017 12:26", 7 | "testChapterColorSystem" : "SL 6/21/2017 01:37", 8 | "testIsProjectReturnsBoolean" : "rhi 10/12/2017 12:51", 9 | "testKoansInChapterAreKoanSteps" : "rhi 10/12/2017 12:50", 10 | "testKoansInChapterContainsCorrectNumberOfKoans" : "SL 7/15/2017 18:53", 11 | "testRequiredClassesAreClasses" : "rhi 10/12/2017 12:51" } } 12 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "rhi 10/12/2017 11:46", 4 | "requiredClasses" : "rhi 10/12/2017 11:46", 5 | "requirements" : "JE 6/8/2017 15:24" }, 6 | "instance" : { 7 | "test01inheritanceVariableInheritanceExists" : "pre 8/30/2021 16:55", 8 | "test02methodInheritanceAndOverridingExist" : "pre 8/30/2021 16:55", 9 | "test03abstractMethodsAreSubclassResponsibility" : "rhi 10/12/2017 09:58", 10 | "test04askSuperWithSuper" : "rhi 10/12/2017 09:59" } } 11 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/instance/test12do.st: -------------------------------------------------------------------------------- 1 | tests 2 | test12do 3 | "The generic path of iterations for collections is the do: method. 4 | You can replace all other methods by a do: construct. 5 | But you should really only do this if you cannot achieve your goal with other collection methods." 6 | 7 | | words completeLength | 8 | completeLength := 0. 9 | words := {'How' . 'dare' . 'you'}. 10 | words do: [:aWord | completeLength := completeLength + aWord size]. 11 | self assert: xx equals: completeLength -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanBrowser.class/instance/buildDescriptionBoxWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildDescriptionBoxWith: aBuilder 3 | 4 | ^ aBuilder pluggableTextSpec new 5 | model: self; 6 | getText: #descriptionBoxContent; 7 | readOnly: true; 8 | indicateUnacceptedChanges: false; 9 | padding: 23 pt @ 18 pt; 10 | textStyle: TextStyle default copy centered; 11 | frame: (LayoutFrame new 12 | leftFraction: 0.38; 13 | topFraction: 0; 14 | rightFraction: 1; 15 | bottomFraction: 0.38 offset: ToolBuilder default buttonRowHeight negated) -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/buildStatusBarWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildStatusBarWith: aBuilder 3 | 4 | ^ aBuilder pluggableTextSpec new 5 | model: self; 6 | getText: #statusBarText; 7 | textColor: #statusBarTextColor; 8 | color: #statusBarBackgroundColor; 9 | readOnly: true; 10 | indicateUnacceptedChanges: false; 11 | frame: (LayoutFrame new 12 | leftFraction: 0 offset: 0; 13 | topFraction: 0 offset: 0; 14 | rightFraction: 1 offset: 0; 15 | bottomFraction: 0 offset: self statusBarHeight); 16 | yourself -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test02everyObjectHasAnId.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02everyObjectHasAnId 3 | "Remember: Everything is an Object, even classes. 4 | 5 | The ancient button of 'debug' below might help to find the true nature of hash. 6 | The debugger is a mighty tool simulating execution of code. 7 | Use 'over' to step to the next message send. 8 | You can select and print code in the debugger as you can in all text windows" 9 | 10 | | anObject | 11 | anObject := Object new. 12 | self assert: xx equals: anObject hash class -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test08identityDictionaryIsRigorous.st: -------------------------------------------------------------------------------- 1 | tests 2 | test08identityDictionaryIsRigorous 3 | "What is the difference to the less rigorous brother Dictionary? 4 | It's the comparison of keys. IdentityDictionary uses ==!" 5 | 6 | | identityDict | 7 | identityDict := IdentityDictionary new 8 | at: 'key' put: 'aValue' ; 9 | yourself. 10 | self assert: (identityDict at: xx) equals: 'aValue'. 11 | identityDict at: (String newFrom: 'key') put: 'thirdValue'. 12 | self assert: (identityDict keys) equals: xx -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutAsserts.class/instance/test05fillInValues.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05fillInValues 3 | "Sometimes we will ask you to fill in the values. 4 | 5 | Quick reminder: During your journey through the Koans you will encounter all ways of sending messages. 6 | Take a first look at them here and learn to use them through your journey." 7 | 8 | self assert: xx equals: 1. 9 | self assert: xx equals: 1 negated. "Unary Message" 10 | self assert: xx equals: 1 + 1. "Binary Message" 11 | self assert: xx equals: (1 raisedToInteger: 1). "Keyword Message" -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutStrings.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "ek 6/14/2023 10:09", 4 | "requirements" : "rhi 10/12/2017 11:49" }, 5 | "instance" : { 6 | "test01stringsAreCollections" : "rhi 10/12/2017 11:17", 7 | "test02escaping" : "JLO 8/4/2017 14:59", 8 | "test03concatenationConnectsHelloAndWorld" : "rhi 10/12/2017 11:18", 9 | "test04aNewLineIsAnewline" : "rhi 10/12/2017 11:18", 10 | "test05createStringsWithFormat" : "rhi 10/12/2017 11:18", 11 | "test06stringsAreNotUnique" : "rhi 10/12/2017 11:19" } } 12 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/instance/test06classesUnderstandCanUnderstand.st: -------------------------------------------------------------------------------- 1 | tests 2 | test06classesUnderstandCanUnderstand 3 | "Always reflecting on yourself isn't good. Use it wisely! 4 | Otherwise, you spill implementation details over your nice model." 5 | 6 | "In most cases, just sending the message instead of checking for it is enough." 7 | 8 | self assert: xx equals: (KoanLotus canUnderstand: #publicInstanceVariable). 9 | self assert: xx equals: (KoanLotus canUnderstand: #walk). 10 | self assert: xx equals: (Class canUnderstand: #canUnderstand:) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutInheritance.class/instance/test01inheritanceVariableInheritanceExists.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01inheritanceVariableInheritanceExists 3 | 4 | "To solve this peculiar Koan, you should take a look at the KoanBonsai classes: 5 | KoanBonsai, KoanMapleBonsai, KoanAiderBonsai. 6 | This could be achieved by pressing a certain button. 7 | A special look at certain instance variables could be useful as well..." 8 | 9 | | aMapleBonsai | 10 | aMapleBonsai := KoanMapleBonsai new. 11 | aMapleBonsai height: 10. 12 | self assert: xx equals: aMapleBonsai height -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/instance/test03theLastStatementReturns.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03theLastStatementReturns 3 | "This is part of the buggy way of the art of Smalltalk. 4 | The value of the last statement of a block is returned. 5 | Always the last!" 6 | 7 | | processing | 8 | 9 | self assert: xx equals: [123 . 456 . 789] value. 10 | self assert: xx equals: ['first' . 'second'] value. 11 | 12 | processing := [:a :b | a. b]. 13 | self assert: xx equals: (processing value: true value: false). 14 | self assert: xx equals: (processing value: false value: true) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/instance/test05whoIAmTellsYouClass.st: -------------------------------------------------------------------------------- 1 | tests 2 | test05whoIAmTellsYouClass 3 | "Always reflecting on yourself isn't good. Use it wisely! 4 | Otherwise, you spill implementation details over your nice model." 5 | 6 | | aLotus | 7 | aLotus := KoanLotus new. 8 | self assert: xx equals: Object new class. 9 | self assert: xx equals: aLotus class. 10 | "A nicer way is to do this using messages:" 11 | self assert: xx equals: String new isString. 12 | self assert: xx equals: WideString new isString. 13 | self assert: xx equals: Object new isString -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/instance/test01collectionsCanComeInDifferentFlavours.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01collectionsCanComeInDifferentFlavours 3 | 4 | self assert: xx equals: Collection new isCollection. 5 | self assert: xx equals: OrderedCollection new isCollection. 6 | self assert: xx equals: Set new isCollection. 7 | self assert: xx equals: Array new isCollection. 8 | self assert: xx equals: String new isCollection. 9 | self assert: xx equals: Dictionary new isCollection. 10 | "...but wait a minute..." 11 | self assert: xx equals: Symbol new isCollection -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutMeta.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "rhi 10/12/2017 11:46", 4 | "requiredClasses" : "rhi 10/12/2017 11:47", 5 | "requirements" : "JE 6/8/2017 15:22" }, 6 | "instance" : { 7 | "test01callAMethodOrLeaveAMessage" : "rhi 10/12/2017 09:59", 8 | "test02sendAMessageWithAttachedArguments" : "rhi 10/12/2017 09:59", 9 | "test03casesByMessageNames" : "rhi 10/12/2017 10:00", 10 | "test04classesAreObjectsAndHaveClassesHaveClasses" : "rhi 10/12/2017 11:08", 11 | "test05classesHaveAccessToHierachy" : "rhi 10/12/2017 11:09" } } 12 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/buttonSpecs.st: -------------------------------------------------------------------------------- 1 | building 2 | buttonSpecs 3 | 4 | ^ #( 5 | ('Overview' changeToSelectionView nil 'Go back to overview') 6 | nil 7 | ('Browse Project' browseProject isBrowseProjectButtonEnabled 'Browse Koans Project') 8 | ('Debug' debugKoan nil 'Debug this Koan') 9 | ('Reset Koan' resetKoan nil 'Reset code an try again') 10 | nil 11 | ('Previous' previousKoan isPreviousButtonEnabled 'Go back to previous Koan') 12 | ('Test' saveAndTest nil 'Save edits and test Koan') 13 | ('Next' nextKoan isNextButtonEnabled 'Proceed to next Koan') 14 | ) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test10yourselfIsTheObjectItself.st: -------------------------------------------------------------------------------- 1 | tests 2 | test10yourselfIsTheObjectItself 3 | 4 | "The method #yourself always returns the object itself. This can be used in cascades such that the last method returns for sure what you expect. 5 | Keep in mind what you previously learned about the used messages." 6 | 7 | | result | 8 | result := Set new 9 | add: 1; 10 | add: 2; 11 | yourself. 12 | self assert: xx equals: result isCollection. 13 | result := 'abc' 14 | reversed; 15 | asUppercase; 16 | yourself. 17 | self assert: xx equals: result -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/instance/runCase..st: -------------------------------------------------------------------------------- 1 | running 2 | runCase: aTestCase 3 | 4 | | testCasePassed | 5 | testCasePassed := true. 6 | [[aTestCase runCase] 7 | on: self class failure 8 | do: [:ex | 9 | failures add: aTestCase. 10 | self storeException: ex for: aTestCase. 11 | testCasePassed := false. 12 | ex return: false]] 13 | on: self class exError 14 | do: [:ex | 15 | errors add: aTestCase. 16 | self storeException: ex for: aTestCase. 17 | testCasePassed := false. 18 | ex return: false]. 19 | testCasePassed 20 | ifTrue: [passed add: aTestCase] -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutBlocks.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "rhi 10/12/2017 11:44", 4 | "requirements" : "JE 6/8/2017 15:18" }, 5 | "instance" : { 6 | "test01whatIsABlock" : "rhi 10/12/2017 08:56", 7 | "test02aBlockCanBeExecuted" : "rhi 10/12/2017 09:22", 8 | "test03theLastStatementReturns" : "ek 6/14/2023 11:25", 9 | "test04blocksCanBeStored" : "rhi 10/12/2017 08:57", 10 | "test05passParametersToBlocksButPassTheRight" : "ek 6/14/2023 11:23", 11 | "test06blocksWithTempVariables" : "rhi 10/12/2017 09:36", 12 | "test07blocksAndConditions" : "ek 6/14/2023 11:25" } } 13 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "rhi 10/12/2017 11:46", 4 | "requiredClasses" : "rhi 10/12/2017 11:46", 5 | "requirements" : "JE 6/8/2017 15:23" }, 6 | "instance" : { 7 | "test01AboutDiceProject" : "ck 9/19/2018 13:20", 8 | "test02rollingTheDiceReturnsASetOfIntegersInsideTheRange" : "rhi 10/12/2017 09:55", 9 | "test03diceValuesDoNotChangeUnlessExplicitlyRolled" : "rhi 10/12/2017 09:56", 10 | "test04diceValuesShouldChangeBetweenRolls" : "rhi 10/12/2017 09:56", 11 | "test05youCanRollDifferentNumbersOfDice" : "rhi 10/12/2017 09:57" } } 12 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/instance/test03compareAndCompar.st: -------------------------------------------------------------------------------- 1 | tests 2 | test03compareAndCompar 3 | "There are two sides to equal. 4 | 5 | The ancient button of 'implementors' above might help reveal the true nature of = and ==. 6 | The ancient button will first require you to choose the message you are interested in. 7 | You may then filter the results by typing in them, type 'object' and find the source of comparisions." 8 | 9 | | anObject anotherObject | 10 | anObject := 'abc'. 11 | anotherObject := String newFrom: anObject. 12 | self assert: xx equals: anObject = anotherObject. 13 | self assert: xx equals: anObject == anotherObject -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanStepTests.class/instance/testReset.st: -------------------------------------------------------------------------------- 1 | tests 2 | testReset 3 | 4 | | step oldestVersion newVersion class selector | 5 | class := KoanMockVersions. 6 | selector := #testWithManyDifferentVersions. 7 | step := KoanStep on: class selector: selector. 8 | oldestVersion := (class changeRecordsAt: selector) last. 9 | step reset. 10 | 11 | "The following is necessary to make sure that the change record 12 | actually has something to read from the changes file. This prevents 13 | timing issues e.g. during CI --pre" 14 | Smalltalk forceChangesToDisk. 15 | 16 | newVersion := (class changeRecordsAt: selector) first. 17 | self assert: oldestVersion text equals: newVersion text -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/instance/test01statementsAreMethodsOfBooleanClass.st: -------------------------------------------------------------------------------- 1 | tests 2 | test01statementsAreMethodsOfBooleanClass 3 | "Even 'statements' are implemented as methods. 4 | Always remember: (Almost) Everything is a message send!" 5 | 6 | | expected | 7 | expected := xx. 8 | self assert: expected equals: (Boolean canUnderstand: #or:). 9 | self assert: expected equals: (Boolean canUnderstand: #and:). 10 | self assert: expected equals: (Boolean canUnderstand: #ifTrue:). 11 | self assert: expected equals: (Boolean canUnderstand: #ifFalse:). 12 | self assert: expected equals: (Boolean canUnderstand: #ifNil:). 13 | self assert: expected equals: (Boolean canUnderstand: #ifNotNil:) -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollections.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "ek 6/14/2023 10:08", 4 | "requirements" : "rhi 10/12/2017 11:45" }, 5 | "instance" : { 6 | "test01collectionsCanComeInDifferentFlavours" : "rhi 10/12/2017 09:39", 7 | "test02collectionsStartAtFirst" : "JLO 8/4/2017 15:17", 8 | "test03arraysAreImmutable" : "rhi 10/12/2017 09:40", 9 | "test04orderedCollection" : "rhi 10/12/2017 09:40", 10 | "test05set" : "rhi 10/12/2017 09:41", 11 | "test06setsBiggerBrotherTheBag" : "rhi 10/12/2017 09:41", 12 | "test07dictionary" : "rhi 10/12/2017 09:41", 13 | "test08identityDictionaryIsRigorous" : "rhi 10/12/2017 09:42", 14 | "test09sortedCollection" : "rhi 10/12/2017 09:43" } } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutDiceProject.class/instance/test02rollingTheDiceReturnsASetOfIntegersInsideTheRange.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02rollingTheDiceReturnsASetOfIntegersInsideTheRange 3 | "The three assert statements in this method show you which behavior 4 | we expect from a die. Tackle these challenges one by one until the roll method 5 | shines in a new light, a brighter light, a better light." 6 | 7 | | dice | 8 | dice := KoanCrystalDice newWithRange: 1 to: 16. 9 | dice roll: 5. 10 | self assert: (dice values isKindOf: Array) description: 'Should be an array'. 11 | self assert: 5 equals: dice values size. 12 | dice values do: [ :value | 13 | self assert: (value >= 1 and: value <= 16) 14 | description: 'Value must be between 1 and 16!'] -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanChapter.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "allChapters" : "rhi 10/12/2017 11:58", 4 | "browseRequiredClasses" : "ck 9/19/2018 10:59", 5 | "icon" : "SL 6/20/2017 22:47", 6 | "isMock" : "JLO 6/14/2017 15:35", 7 | "isProject" : "SL 7/12/2017 20:40", 8 | "koansInChapter" : "SL 6/19/2017 18:22", 9 | "methodsInChapter" : "SL 6/19/2017 18:21", 10 | "priority" : "SL 7/12/2017 20:38", 11 | "requiredClasses" : "SL 7/12/2017 20:47", 12 | "requiredClassesNames" : "SL 7/12/2017 20:57", 13 | "requirements" : "SL 7/12/2017 20:48", 14 | "resetKoansInChapter" : "JLO 7/20/2017 11:40" }, 15 | "instance" : { 16 | "debugAsFailure" : "mt 10/25/2022 15:50", 17 | "initialize" : "rhi 10/12/2017 12:10" } } 18 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutControlStatements.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "ek 6/14/2023 10:08", 4 | "requirements" : "rhi 10/12/2017 11:45" }, 5 | "instance" : { 6 | "test01statementsAreMethodsOfBooleanClass" : "rhi 10/12/2017 09:47", 7 | "test02statementsTakeBlocks" : "rhi 10/12/2017 09:48", 8 | "test03conditionalExecution" : "rhi 10/12/2017 09:48", 9 | "test04conditionalExecutionWithExpressions" : "rhi 10/12/2017 09:48", 10 | "test05statementsInAssignments" : "rhi 10/12/2017 09:49", 11 | "test06implication" : "rhi 10/12/2017 09:49", 12 | "test07nil" : "rhi 10/12/2017 09:49", 13 | "test08loopsOperateOnBlocks" : "rhi 10/12/2017 09:50", 14 | "test09loopExecution" : "rhi 10/12/2017 09:50" } } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/instance/test02instanceVariablesAreEncapsulated.st: -------------------------------------------------------------------------------- 1 | tests 2 | test02instanceVariablesAreEncapsulated 3 | "First take a look at the KoanLotus class using the 'browse' button. 4 | (You may also select 'KoanLotus' and click browse it) 5 | 6 | It has two instance variables: privateInstanceVariable and publicInstanceVariable. 7 | Also look at the methods of the Lotus. Now what will happen down below? 8 | 9 | Hint: 10 | should:raise: executes the code in braces and looks for an exception specified after raise:. 11 | You can find the name of the exception class in the title of the debugger window above." 12 | 13 | | aLotus | 14 | aLotus := KoanLotus new. 15 | self should: [aLotus privateInstanceVariable] raise: xx -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutClasses.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "koan05whoIAmTellsYouClassSuccess" : "ek 6/14/2023 11:14", 4 | "koan06classesUnderstandCanUnderstandSuccess" : "ek 6/14/2023 11:14", 5 | "priority" : "rhi 10/12/2017 11:44", 6 | "requiredClasses" : "rhi 10/12/2017 11:44", 7 | "requirements" : "JE 6/8/2017 15:19" }, 8 | "instance" : { 9 | "test01createAnInstanceWithNew" : "rhi 10/12/2017 09:11", 10 | "test02instanceVariablesAreEncapsulated" : "ek 6/14/2023 11:00", 11 | "test03theTaleOfNewAndBasicNew" : "rhi 10/12/2017 09:14", 12 | "test04useGettersAndSetters" : "rhi 10/12/2017 09:15", 13 | "test05whoIAmTellsYouClass" : "rhi 10/12/2017 09:25", 14 | "test06classesUnderstandCanUnderstand" : "ek 6/14/2023 11:11" } } 15 | -------------------------------------------------------------------------------- /src/BaselineOfKoans.package/BaselineOfKoans.class/instance/baseline..st: -------------------------------------------------------------------------------- 1 | baseline 2 | baseline: spec 3 | 4 | spec for: #common do: [ 5 | spec 6 | package: 'Koans-Core'; 7 | package: 'Koans-Chapters' with: [spec requires: #('Core')]; 8 | package: 'Koans-Tests' with: [spec requires: #('Core')]. 9 | spec 10 | group: 'Core' with: #('Koans-Core'); 11 | group: 'Tests' with: #('Koans-Tests' 'Koans-Chapters'); 12 | group: 'default' with: #('Core' 'Koans-Chapters' 'Tests'); 13 | group: 'CompleteWithoutTests' with: #('Core'); 14 | group: 'CompleteWithTests' with: #('CompleteWithoutTests' 'Tests')]. 15 | 16 | spec for: #('squeak5.0.x' 'squeak5.1.x') do: [ 17 | spec package: 'Koans' with: [ 18 | spec repository: 'github://HPI-SWA-Teaching/Koans:squeak50/src']] -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutSymbols.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "ek 6/14/2023 10:09", 4 | "requirements" : "JE 6/8/2017 15:23" }, 5 | "instance" : { 6 | "test01symbolsAreSymbols" : "rhi 10/12/2017 11:19", 7 | "test02symbolsCanBeCompared" : "rhi 10/12/2017 11:20", 8 | "test03identicalSymbolsAreASingleIdenticalObject" : "rhi 10/12/2017 11:20", 9 | "test04methodNamesBecomeSymbols" : "rhi 10/25/2018 09:26", 10 | "test05symbolsCanBeMadeFromStrings" : "rhi 10/12/2017 11:22", 11 | "test06symbolsWithSpacesCanBeMade" : "rhi 10/12/2017 11:22", 12 | "test07symbolsAreSpecialStrings" : "rhi 10/12/2017 11:40", 13 | "test08symbolsAreImmutable" : "rhi 10/12/2017 11:40", 14 | "test09symbolsCanBeDynamicallyCreated" : "JLO 8/4/2017 15:13" } } 15 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutCollectionProtocol.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "priority" : "ek 6/14/2023 10:08", 4 | "requirements" : "rhi 10/12/2017 11:45" }, 5 | "instance" : { 6 | "test01includes" : "rhi 10/12/2017 09:26", 7 | "test02anySatisfy" : "rhi 10/12/2017 09:29", 8 | "test03allSatisfy" : "rhi 10/12/2017 09:20", 9 | "test04select" : "rhi 10/12/2017 09:21", 10 | "test05reject" : "rhi 10/12/2017 09:21", 11 | "test06mathStuff" : "rhi 10/12/2017 09:21", 12 | "test07detect" : "rhi 10/12/2017 09:28", 13 | "test08detectIfNone" : "ek 6/14/2023 10:37", 14 | "test09collect" : "rhi 10/12/2017 09:28", 15 | "test10inject" : "rhi 10/12/2017 09:32", 16 | "test11sizeAndCount" : "rhi 10/12/2017 09:33", 17 | "test12do" : "rhi 10/12/2017 09:35", 18 | "test13specialIterators" : "rhi 10/12/2017 09:34" } } 19 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanEditor.class/instance/buildButtonBarWith..st: -------------------------------------------------------------------------------- 1 | building 2 | buildButtonBarWith: aBuilder 3 | 4 | | panelSpec | 5 | panelSpec := aBuilder pluggablePanelSpec new. 6 | panelSpec 7 | layout: #horizontal; 8 | children: OrderedCollection new; 9 | frame: (LayoutFrame 10 | fractions: (0@1 corner: 1@1) 11 | offsets: (0@ self class buttonHeight negated corner: 0@0)). 12 | 13 | self buttonSpecs do: [:spec | panelSpec children add: ( 14 | spec 15 | ifNil: [aBuilder pluggableSpacerSpec new] 16 | ifNotNil: [ | label action enabled help | 17 | label := spec first. 18 | action := spec second. 19 | enabled := spec third. 20 | help := spec fourth. 21 | aBuilder pluggableButtonSpec new 22 | model: self; 23 | label: label; 24 | action: action; 25 | enabled: enabled; 26 | help: help; 27 | yourself])]. 28 | 29 | ^panelSpec -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanUITests.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "clearHistory:" : "rhi 10/12/2017 12:59", 6 | "clearHistory:for:" : "rhi 10/12/2017 12:59", 7 | "newMorphs" : "JE 7/20/2017 10:32", 8 | "setUp" : "rhi 10/12/2017 13:08", 9 | "tearDown" : "JE 8/4/2017 16:57", 10 | "testChangeToEditorViewClosesOwnWindow" : "rhi 10/12/2017 12:56", 11 | "testChangeToEditorViewOpensAWindowWithAKoanEditorAsModel" : "rhi 10/12/2017 12:57", 12 | "testChangeToSelectionViewClosesOwnWindow" : "rhi 10/12/2017 12:57", 13 | "testChangeToSelectionViewOpensAWindowWithAKoanBrowserAsModel" : "rhi 10/12/2017 12:57", 14 | "testDebuggerIsOpenedWhenDebugButtonIsClicked" : "JE 7/24/2017 17:36", 15 | "testErrorIcon" : "pre 9/20/2018 06:46", 16 | "testFailIcon" : "pre 9/20/2018 06:46", 17 | "testNoneIcon" : "pre 9/20/2018 06:46", 18 | "testPassIcon" : "pre 9/20/2018 06:45" } } 19 | -------------------------------------------------------------------------------- /src/Koans-Core.package/KoanTestResult.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "creationTime" : "je 3/1/2019 11:25", 6 | "creationTime:" : "je 3/1/2019 11:25", 7 | "exceptionContext" : "SL 7/15/2017 17:49", 8 | "exceptionLine" : "SL 7/15/2017 18:38", 9 | "exceptionMessage" : "SL 7/15/2017 18:57", 10 | "exceptionType" : "SL 7/15/2017 18:44", 11 | "exceptions" : "PG 8/4/2017 16:33", 12 | "exceptions:" : "PG 8/4/2017 16:33", 13 | "expirationTime" : "je 3/8/2019 12:11", 14 | "firstException" : "topa 10/14/2015 13:38", 15 | "initialize" : "je 3/1/2019 11:44", 16 | "isExpired" : "je 3/1/2019 11:48", 17 | "lineNumberOfException" : "SL 7/15/2017 20:10", 18 | "runCase:" : "ek 10/22/2022 15:21", 19 | "sourceRangeOfException" : "ck 9/19/2018 10:40", 20 | "storeException:for:" : "PG 8/4/2017 16:34", 21 | "testContext" : "ek 10/22/2022 17:04", 22 | "testSource" : "SL 7/15/2017 18:34" } } 23 | -------------------------------------------------------------------------------- /src/Koans-Tests.package/KoanBrowserTests.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | }, 4 | "instance" : { 5 | "setUp" : "SL 6/28/2017 20:40", 6 | "testBrowseButtonDisabledForNormalChapter" : "rhi 10/12/2017 12:44", 7 | "testBrowseButtonEnabledForProjectChapter" : "rhi 10/12/2017 12:44", 8 | "testBrowseButtonOpensCorrectClasses" : "PG 7/13/2017 12:02", 9 | "testBuildBrowseButtonWithReturnsSpec" : "PG 7/13/2017 11:41", 10 | "testBuildChapterListWithReturnsSpec" : "SL 6/28/2017 20:40", 11 | "testBuildKoanListWithReturnsSpec" : "SL 6/28/2017 20:40", 12 | "testBuildWithReturnsWindow" : "SL 6/28/2017 20:40", 13 | "testChapterListContainsChapters" : "rhi 10/12/2017 12:45", 14 | "testChapterListIsNotEmpty" : "JLO 7/20/2017 12:24", 15 | "testChapterListOrderedByPriority" : "rhi 10/12/2017 12:45", 16 | "testChapterTooltip" : "rhi 10/12/2017 12:44", 17 | "testChapterTooltipNotNil" : "rhi 10/12/2017 12:46", 18 | "testKoanListIsNotNilWhenNoChapterSelected" : "rhi 10/12/2017 12:44" } } 19 | -------------------------------------------------------------------------------- /src/Koans-Chapters.package/KoanAboutObjects.class/methodProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "class" : { 3 | "koan07useCascadesToNotRepeatSuccess" : "ek 6/14/2023 11:04", 4 | "koan08useCascadesToNotRepeatButBeCareful1Success" : "ek 6/14/2023 11:06", 5 | "koan09useCascadesToNotRepeatButBeCareful2Success" : "ek 6/14/2023 11:08", 6 | "priority" : "rhi 10/12/2017 11:49", 7 | "requirements" : "JE 6/8/2017 15:22" }, 8 | "instance" : { 9 | "test01everythingIsAnObject" : "rhi 10/12/2017 11:15", 10 | "test02everyObjectHasAnId" : "ek 6/14/2023 10:30", 11 | "test03compareAndCompar" : "ek 6/14/2023 10:25", 12 | "test04everyObjectHasADifferentId" : "rhi 10/12/2017 11:16", 13 | "test05butNotSmallIntegers" : "rhi 10/12/2017 08:50", 14 | "test06copyObjectsWithNewFrom" : "rhi 10/12/2017 08:50", 15 | "test07useCascadesToNotRepeat" : "ek 6/14/2023 11:02", 16 | "test08useCascadesToNotRepeatButBeCareful1" : "ek 6/14/2023 10:52", 17 | "test09useCascadesToNotRepeatButBeCareful2" : "ek 6/14/2023 10:54", 18 | "test10yourselfIsTheObjectItself" : "ek 6/14/2023 11:06" } } 19 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | on: [push, pull_request] 3 | 4 | # Controls when the action will run. Triggers the workflow on push or pull request 5 | # events but only for the master branch 6 | jobs: 7 | # This workflow contains a single job called "build" 8 | build: 9 | runs-on: ${{ matrix.os }} 10 | strategy: 11 | matrix: 12 | # Select platform(s) 13 | os: [ ubuntu-latest ] 14 | # Select compatible Smalltalk image(s) 15 | smalltalk: [ Squeak64-trunk, Squeak64-6.0 ] 16 | name: ${{ matrix.smalltalk }} on ${{ matrix.os }} 17 | steps: 18 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 19 | - uses: actions/checkout@v2 20 | - uses: hpi-swa/setup-smalltalkCI@v1 21 | with: 22 | smalltalk-image: ${{ matrix.smalltalk }} 23 | env: 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | - run: smalltalkci -s ${{ matrix.smalltalk }} 26 | timeout-minutes: 15 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | --------------------------------------------------------------------------------