Skip to content

maxim_korobkov#139

Open
korobprog wants to merge 3 commits intonickovchinnikov:nick/lesson2from
korobprog:korobkov_m_calk
Open

maxim_korobkov#139
korobprog wants to merge 3 commits intonickovchinnikov:nick/lesson2from
korobprog:korobkov_m_calk

Conversation

@korobprog
Copy link

делал как мог друзья :)

@@ -0,0 +1,43 @@
<!DOCTYPE html>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

как то это подозрительно смахивает на CREATE REACT APP

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и зачем весь этот код в public ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

удалил библиотеку React

@@ -0,0 +1,25 @@
import { firstPrioritiesCalc, secondPrioritiesCalc } from "./engine";

test("firstPrioritiesCalc: [1, * 32]", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// import { firstPrioritiesCalc, secondPrioritiesCalc } from "./engine";

// const table = [
// [1, "*", 32, 32],
// [32, "/", 32, 1],
// [32, "+", 32, 64],
// [32, "**", 0, 1024],
// [32, "^", 2, 1024],
// [6, "!", 0, 720],
// ];

// test.each(table)(
// "firstPrioritiesCalc(%s, %s, %s)",
// (a, operator, b, result) => {
// expect(firstPrioritiesCalc([a, operator, b])).toEqual(result);
// }
// );

// test.each(table)(
// "secondPrioritiesCalc(%s, %s, %s)",
// (a, operator, b, result) => {
// expect(secondPrioritiesCalc([a, operator, b])).toEqual(result);
// }
// );

Comment on lines +26 to +27
first: number,
second: number
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вот эти типы уже заложены в ScalarOperationType так что тут просто дублирование кода

@korobprog korobprog changed the title calculator v1 maxim_korobkov Apr 11, 2022
@korobprog korobprog changed the base branch from master to nick/lesson2 April 16, 2022 05:35
// });

// test("secondPrioritiesCalc: [32, x 32]", () => {
// expect(secondPrioritiesCalc([32, "x", 32])).toEqual(0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это еще почему?

// expect(firstPrioritiesCalc([32, "/", 32])).toEqual([1]);
// });

// // test("firstPrioritiesCalc: [32, + 32]", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а чем идея в возвращении массива?

secondPrioritiesCalc возвращает число

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants