-
Notifications
You must be signed in to change notification settings - Fork 33
Гущин Андрей #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
18thday
wants to merge
34
commits into
psds-cpp:main
Choose a base branch
from
GushchinAndrei1:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Гущин Андрей #25
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
28d08cd
реализация addition
GushchinAndrei1 74d74df
Update testing.yml
GushchinAndrei1 69700c1
реализация print_bits.cpp
GushchinAndrei1 c4df47e
Merge branch 'development' of github.com:GushchinAndrei1/psds-cpp-202…
GushchinAndrei1 b83a96f
реализация print_bits.cpp
GushchinAndrei1 9ac64e2
Update testing.yml
GushchinAndrei1 62eec26
Update testing.yml
GushchinAndrei1 934f30d
реализация rms
GushchinAndrei1 7b75756
реализцаия check_flags
GushchinAndrei1 8b8b294
реализация length
GushchinAndrei1 ef05ef7
реализация quadratic
GushchinAndrei1 ac1a145
Update testing.yml
GushchinAndrei1 3c0000c
небольшая корректровка, добавление values == nullptr
GushchinAndrei1 d49f95d
реализация char_changer
GushchinAndrei1 9eb26d0
resolve conflict in testing.yml
GushchinAndrei1 7977551
Update testing.yml
GushchinAndrei1 a328691
реализация swap_ptr
GushchinAndrei1 25e327f
Merge branch 'development' of github.com:GushchinAndrei1/psds-cpp-202…
GushchinAndrei1 0ed0241
реализация func_array
GushchinAndrei1 23c09fd
реализация func_array
GushchinAndrei1 dc7e2ca
доработка swap_ptr
GushchinAndrei1 31c0c0e
реализация longest
GushchinAndrei1 aba1f07
реализация last_of_us
GushchinAndrei1 fa0ab69
fix
GushchinAndrei1 1ddb73c
исправление конфликтов
GushchinAndrei1 31865a2
Fix test.cpp
GushchinAndrei1 376dc49
Sync pretty_array from main
GushchinAndrei1 92a4646
Merge branch 'main' of https://github.com/psds-cpp/psds-cpp-2025
GushchinAndrei1 c4492a4
Merge branch 'main' of github.com:GushchinAndrei1/psds-cpp-2025
GushchinAndrei1 e85e397
Merge branch 'main' of github.com:psds-cpp/psds-cpp-2025
18thday 7791b0b
Merge remote-tracking branch 'upstream/main'
GushchinAndrei1 5904d15
Merge branch 'main' of github.com:GushchinAndrei1/psds-cpp-2025
GushchinAndrei1 6cd86bd
Add 05_week
GushchinAndrei1 f66a69f
Update
GushchinAndrei1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| name: Testing Tasks Week 05 | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| tasks: | ||
| description: 'Select tasks to test' | ||
| required: true | ||
| type: choice | ||
| default: 'all' | ||
| options: | ||
| - all | ||
| - tracer | ||
| - string_view | ||
| - cow_string | ||
| - simple_vector | ||
|
|
||
| schedule: | ||
| - cron: '59 20 16 02 *' # UTC: 20:59 = 23:59 MSK 16 February | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install compiler and CMake | ||
| run: sudo apt install -y cmake build-essential g++-14 libgtest-dev libgmock-dev | ||
|
|
||
| - name: Configure project | ||
| run: cmake -B build | ||
|
|
||
| - name: Determine tasks to run | ||
| id: get-tasks | ||
| run: | | ||
| if [["${{ github.event_name }}" = "schedule"]] || | ||
| [[ "${{ github.event.inputs.tasks }}" = "all" ]]; then | ||
| # Find all tasks | ||
| TASKS=() | ||
| for dir in 05_week/tasks/*/; do | ||
| task=$(basename "$dir") | ||
| TASKS+=("$task") | ||
| done | ||
| echo "tasks=${TASKS[*]}" >> $GITHUB_OUTPUT | ||
| else | ||
| # Используем указанную задачу | ||
| echo "tasks=${{ github.event.inputs.tasks }}" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Build and run tests for selected tasks | ||
| run: | | ||
| echo "Event: ${{ github.event_name }}" | ||
| echo "Tasks to test: '${{ steps.get-tasks.outputs.tasks }}'" | ||
|
|
||
| IFS=' ' read -ra tasks <<< "${{ steps.get-tasks.outputs.tasks }}" | ||
|
|
||
| declare -i passed_count=0 | ||
| declare -i failed_count=0 | ||
| declare -i task_count=0 | ||
|
|
||
| # task name arrays | ||
| passed_tasks=() | ||
| failed_tasks=() | ||
|
|
||
| echo "=== Starting tests for selected tasks ===" | ||
|
|
||
| for task in "${tasks[@]}"; do | ||
| task_count+=1 | ||
| echo "=== Processing $task ===" | ||
|
|
||
| if cmake --build build --target test_$task; then | ||
| echo "✅ test_$task built successfully" | ||
|
|
||
| if ./build/tasks/test_$task; then | ||
| echo "✅ test_$task PASSED" | ||
| passed_count+=1 | ||
| passed_tasks+=("$task") | ||
| else | ||
| echo "❌ test_$task FAILED" | ||
| failed_count+=1 | ||
| failed_tasks+=("$task") | ||
| fi | ||
| else | ||
| echo "❌ test_$task build FAILED" | ||
| failed_count+=1 | ||
| failed_tasks+=("$task") | ||
| fi | ||
| done | ||
|
|
||
| echo "=== Test Results Summary ===" | ||
| echo "Total tasks in list: ${#tasks[@]}" | ||
| echo "Processed: $task_count" | ||
| echo "✅ Passed: $passed_count [$(echo ${passed_tasks[@]} | tr ' ' ', ')]" | ||
| echo "❌ Failed: $failed_count [$(echo ${failed_tasks[@]} | tr ' ' ', ')]" | ||
|
|
||
| if [ $failed_count -gt 0 ]; then | ||
| echo "❌ Some tasks failed!" | ||
| exit 1 | ||
| elif [ $task_count -eq 0 ]; then | ||
| echo "No tasks were processed (no changes)" | ||
| exit 0 | ||
| else | ||
| echo "✅ All processed tasks passed!" | ||
| exit 0 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| #include <cstdint> | ||
| #include <stdexcept> | ||
|
|
||
| #include <cstddef> // заголовочный файл с целочисленными типами фиксированного размера | ||
| #include <stdexcept> // из этого мы ничего не используем | ||
|
|
||
| // функция принимает две перменных типа int и возвращает число типа int64_t | ||
| int64_t Addition(int a, int b) { | ||
| throw std::runtime_error{"Not implemented"}; | ||
| } | ||
|
|
||
| // Чтобы сложение выполнялось в int64_t, приводим a и b к этому типу | ||
| // static_cast<новый тип>(переменная) | ||
| return static_cast<int64_t>(a) + static_cast<int64_t>(b); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лишний каст, достаточно явно кастовать только один операнд, второй будет неявно преобразован, необходимо использовать данную возможность языка и не писать лишний код