Opened 4 years ago

Closed 4 years ago

#271 closed ожидается проверка (задача сдана)

ha4

Reported by: basharin.egor Owned by: rutsky,grabovoy.philipp
Priority: проверка Milestone: ha4-milestone2
Component: HA#4 function Version: 1.0
Keywords: Cc: eaniconer@…

Description

Implementation of fn::function<T>

Change History (15)

comment:1 Changed 4 years ago by cpptester

Type: ожидается проверкаожидаются исправления

Tested revision 590 by basharin.egor.

Main tests

test

stage

result

info

log

run_free_function.cpp

SUCCESS
FAILURE

exit code 139

run_free_function-run.log

run_functor_copied.cpp

SUCCESS
FAILURE

exit code 139

run_functor_copied-run.log

Common header used in some tests: common.h

comment:2 Changed 4 years ago by cpptester

Tested revision 656 by basharin.egor.

Smoke tests

test

stage

result

info

log

run_function_smoke_test.cpp

WARNING

run_function_smoke_test-gcc62.log

SUCCESS
FAILURE

exit code 1

run_function_smoke_test-valgrind.log

WARNING

run_function_smoke_test-gcc62-asan.log

SUCCESS
WARNING

run_function_smoke_test-clang-san.log

WARNING

run_function_smoke_test-san.log

Common header used in some tests: common.h

comment:3 Changed 4 years ago by cpptester

Tested revision 657 by basharin.egor.

Smoke tests

test

stage

result

info

log

run_function_smoke_test.cpp

SUCCESS
SUCCESS
FAILURE

exit code 1

run_function_smoke_test-valgrind.log

SUCCESS
SUCCESS
SUCCESS
WARNING

run_function_smoke_test-san.log

Common header used in some tests: common.h

comment:4 Changed 4 years ago by cpptester

Tested revision 658 by basharin.egor.

All tests passed. Good job!

comment:5 Changed 4 years ago by basharin.egor

Milestone: ha4-milestone1ha4-milestone2
Type: ожидаются исправленияожидается проверка

comment:6 Changed 4 years ago by cpptester

Type: ожидается проверкаожидаются исправления

Tested revision 658 by basharin.egor.

Main tests

test

stage

result

info

log

run_functor_desctructor.cpp

SUCCESS
FAILURE

exit code 139

run_functor_desctructor-run.log

Common header used in some tests: common.h

comment:7 Changed 4 years ago by cpptester

Tested revision 658 by basharin.egor.

Main tests

test

stage

result

info

log

run_functor_desctructor.cpp

SUCCESS
FAILURE

exit code 139

run_functor_desctructor-run.log

Common header used in some tests: common.h

comment:8 Changed 4 years ago by Vladimir Rutsky

Замечания:

  1. Используйте std::unique_ptr для хранения обёрнутого функтора, вместо std::shared_ptr --- вам достаточно единоличного владения обернутом функтором.
  1. Используйте тип fun_type вместо void* для raw_func_, тогда reinterpret_cast будет не нужен.
  1. Зачем вы разделяете варианты константного и неконстантного функтора? function должен хранить функтор "по значению" (копию), поэтому всегда можно принимать константный функтор и копировать его (кроме move-конструктора и operator=). Также я рекомендую реализовать operator= через конструктор и swap, а не наоборот.

comment:9 Changed 4 years ago by cpptester

Tested revision 658 by basharin.egor.

Main tests

test

stage

result

info

log

run_functor_desctructor.cpp

SUCCESS
FAILURE

exit code 139

run_functor_desctructor-run.log

Common header used in some tests: common.h

comment:10 Changed 4 years ago by cpptester

Tested revision 658 by basharin.egor.

All tests passed. Good job!

comment:11 Changed 4 years ago by cpptester

Tested revision 713 by basharin.egor.

All tests passed. Good job!

comment:12 Changed 4 years ago by cpptester

Tested revision 728 by basharin.egor.

All tests passed. Good job!

comment:13 Changed 4 years ago by basharin.egor

  1. fixed
  2. fixed
  3. fixed

comment:14 Changed 4 years ago by basharin.egor

Type: ожидаются исправленияожидается проверка

comment:15 Changed 4 years ago by Vladimir Rutsky

Resolution: задача сдана
Status: newclosed

Решение зачтено.

Note: See TracTickets for help on using tickets.