Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 0 additions & 114 deletions public/externalLibs/graphics/CURVES_README.md

This file was deleted.

2 changes: 0 additions & 2 deletions src/commons/application/types/ExternalTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export type External = {
export enum ExternalLibraryName {
NONE = 'NONE',
RUNES = 'RUNES',
CURVES = 'CURVES',
SOUNDS = 'SOUNDS',
BINARYTREES = 'BINARYTREES',
PIXNFLIX = 'PIXNFLIX',
Expand Down Expand Up @@ -149,7 +148,6 @@ const machineLearningLibrary = [
const libEntries: Array<[ExternalLibraryName, string[]]> = [
[ExternalLibraryName.NONE, []],
[ExternalLibraryName.RUNES, runesLibrary],
[ExternalLibraryName.CURVES, []],
[ExternalLibraryName.SOUNDS, soundsLibrary],
[ExternalLibraryName.BINARYTREES, binaryTreesLibrary],
[ExternalLibraryName.PIXNFLIX, videoLibrary],
Expand Down
16 changes: 8 additions & 8 deletions src/commons/mocks/AssessmentMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ export const mockRuneLibrary: Library = {
globals: mockGlobals
};

const mockCurveLibrary: Library = {
const mockBinaryTreeLibrary: Library = {
chapter: 4,
external: {
name: ExternalLibraryName.CURVES,
symbols: externalLibraries.get(ExternalLibraryName.CURVES)!
name: ExternalLibraryName.BINARYTREES,
symbols: externalLibraries.get(ExternalLibraryName.BINARYTREES)!
},
globals: mockGlobals
};
Expand Down Expand Up @@ -399,7 +399,7 @@ export const mockAssessmentQuestions: Array<IProgrammingQuestion | IMCQQuestion>
{
answer: 3,
content:
'This is the 3rd question. Oddly enough, it is an ungraded MCQ question that uses the curves library! Option C has a null hint!',
'This is the 3rd question. Oddly enough, it is an ungraded MCQ question that uses the binary tree library! Option C has a null hint!',
choices: [
{
content: '**Option** `A`',
Expand All @@ -419,7 +419,7 @@ export const mockAssessmentQuestions: Array<IProgrammingQuestion | IMCQQuestion>
}
],
id: 2,
library: mockCurveLibrary,
library: mockBinaryTreeLibrary,
type: 'mcq',
solution: 0,
xp: 0,
Expand All @@ -429,7 +429,7 @@ export const mockAssessmentQuestions: Array<IProgrammingQuestion | IMCQQuestion>
{
answer: 3,
content:
'This is the 4rth question. Oddly enough, it is a graded MCQ question that uses the curves library!',
'This is the 4th question. Oddly enough, it is a graded MCQ question that uses the binary tree library!',
choices: [
{
content: 'A',
Expand All @@ -449,7 +449,7 @@ export const mockAssessmentQuestions: Array<IProgrammingQuestion | IMCQQuestion>
}
],
id: 3,
library: mockCurveLibrary,
library: mockBinaryTreeLibrary,
type: 'mcq',
solution: null,
xp: 0,
Expand Down Expand Up @@ -484,7 +484,7 @@ export const mockClosedAssessmentQuestions: Array<IProgrammingQuestion | IMCQQue
}`,
content: 'You can see autograding results!!!',
id: 0,
library: mockCurveLibrary,
library: mockRuneLibrary,
prepend: '',
postpend: "// This is a mock Postpend! You shouldn't be able to see me!",
testcases: [
Expand Down
4 changes: 0 additions & 4 deletions src/commons/sagas/WorkspaceSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,6 @@ export default function* WorkspaceSaga(): SagaIterator {
(window as any).getReadyWebGLForCanvas('3d');
(window as any).getReadyStringifyForRunes(stringify);
break;
case ExternalLibraryName.CURVES:
(window as any).loadLib('CURVES');
(window as any).getReadyWebGLForCanvas('curve');
break;
case ExternalLibraryName.MACHINELEARNING:
(window as any).loadLib('MACHINELEARNING');
break;
Expand Down
29 changes: 0 additions & 29 deletions src/commons/sagas/__tests__/WorkspaceSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,35 +600,6 @@ describe('BEGIN_CLEAR_CONTEXT', () => {
});
});
});

test('loads CURVES library correctly', () => {
const newExternalLibraryName = ExternalLibraryName.CURVES;

const symbols = externalLibraries.get(newExternalLibraryName)!;
const library: Library = {
chapter,
external: {
name: newExternalLibraryName,
symbols
},
globals
};

return expectSaga(workspaceSaga)
.put.like({ action: endClearContext(library, workspaceLocation) })
.dispatch({
type: BEGIN_CLEAR_CONTEXT,
payload: { library, workspaceLocation, shouldInitLibrary: true }
})
.silentRun()
.then(() => {
expect(loadLib).toHaveBeenCalledWith('CURVES');
expect(getReadyWebGLForCanvas).toHaveBeenCalledWith('curve');
globals.forEach(item => {
expect(window[item[0]]).toEqual(item[1]);
});
});
});
});

describe('evalCode', () => {
Expand Down