Skip to content

Commit

Permalink
fix gitignore and rebuilt project
Browse files Browse the repository at this point in the history
  • Loading branch information
Recrusion committed Dec 14, 2024
1 parent b67e514 commit 50ba96a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 83 deletions.
1 change: 0 additions & 1 deletion rpgsaga/saga/src/classVehicle/classSportCar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ export class SportCar extends Vehicle {
return `SportCar: {brand: ${this.branD}, speed: ${this.speeD}, color: ${this.coloR}, Power: ${this.poweR}}`;
}
}

1 change: 0 additions & 1 deletion rpgsaga/saga/src/classVehicle/classTruck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ export class Truck extends Vehicle {
return `Truck: {brand: ${this.branD}, speed: ${this.speeD}, color: ${this.coloR}, Wheel Base Length: ${this.wheelBaseLengtH}}`;
}
}

81 changes: 0 additions & 81 deletions rpgsaga/saga/tests/calculateFunctions.test.ts
Original file line number Diff line number Diff line change
@@ -1,83 +1,3 @@
<<<<<<< HEAD
import { calculateFuncA } from "../src/calculateFunctions/calculateFunctions"
import { calculateFuncB } from "../src/calculateFunctions/calculateFunctions"

describe('calculateFuncA', () => {
it('should return correct results for a basic range', () => {
const results = calculateFuncA(1, 3, 1);
const expected = [
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
Math.pow(Math.abs(2 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(2 ** 2), 1 / 3),
Math.pow(Math.abs(3 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(3 ** 2), 1 / 3),
];
expect(results).toEqual(expected);
});

it('should return correct results with a different step', () => {
const results = calculateFuncA(1, 3, 2);
const expected = [
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
Math.pow(Math.abs(3 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(3 ** 2), 1 / 3),
];
expect(results).toEqual(expected);
});

it('should return an empty array if xStart is greater than xFinish', () => {
const results = calculateFuncA(5, 3, 1);
expect(results).toEqual([]);
});

it('should handle a step of 0 gracefully', () => {
// Если шаг равен 0, это приведёт к бесконечному циклу
expect(() => calculateFuncA(1, 3, 0)).toThrow();
});

it('should return correct results for values that might cause issues with log10', () => {
expect(() => calculateFuncA(0, 3, 1)).toThrow(); // log10(0) не существует
});
});

describe('calculateFuncB', () => {
it('should return correct results for a set of positive numbers', () => {
const results = calculateFuncB(1, 2, 3, 4, 5);
const expected = [
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
Math.pow(Math.abs(2 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(2 ** 2), 1 / 3),
Math.pow(Math.abs(3 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(3 ** 2), 1 / 3),
Math.pow(Math.abs(4 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(4 ** 2), 1 / 3),
Math.pow(Math.abs(5 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(5 ** 2), 1 / 3),
];
expect(results).toEqual(expected);
});

it('should handle negative numbers correctly', () => {
const results = calculateFuncB(-1, -2, -3, -4, -5);
const expected = [
Math.pow(Math.abs((-1) ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10((-1) ** 2), 1 / 3),
Math.pow(Math.abs((-2) ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10((-2) ** 2), 1 / 3),
Math.pow(Math.abs((-3) ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10((-3) ** 2), 1 / 3),
Math.pow(Math.abs((-4) ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10((-4) ** 2), 1 / 3),
Math.pow(Math.abs((-5) ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10((-5) ** 2), 1 / 3),
];
expect(results).toEqual(expected);
});

it('should handle zero value correctly (expecting error due to log10(0))', () => {
expect(() => calculateFuncB(0, 2, 3, 4, 5)).toThrow();
});

it('should return an array with a single result if all values are the same', () => {
const results = calculateFuncB(1, 1, 1, 1, 1);
const expected = [
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
Math.pow(Math.abs(1 ** 2 - 2.5), 1 / 4) + Math.pow(Math.log10(1 ** 2), 1 / 3),
];
expect(results).toEqual(expected);
});
=======
import { calculateFuncA, calculateFuncB } from '../src/calculateFunctions/calculateFunctions';

describe('calculateFuncA', () => {
Expand Down Expand Up @@ -155,5 +75,4 @@ describe('calculateFuncB', () => {
];
expect(results).toEqual(expected);
});
>>>>>>> e6eef1c (fix gitignore and rebuilt project)
});

0 comments on commit 50ba96a

Please sign in to comment.