Skip to content

Disk tests#26

Merged
RomanPodymov merged 1 commit intomainfrom
feature/more_tests
Apr 30, 2025
Merged

Disk tests#26
RomanPodymov merged 1 commit intomainfrom
feature/more_tests

Conversation

@RomanPodymov
Copy link
Owner

No description provided.

@RomanPodymov RomanPodymov requested a review from Copilot April 30, 2025 21:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds disk-related tests and updates the BackendlessUserAPI to support saving an optional token value. Key changes include adding tests for disk operations (testDisk and testGetAllParams), updating the API header to accept a default parameter for saving tokens, and modifying the implementation accordingly.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Tests/test.cpp Added new tests for disk operations and renamed an existing test.
BackendlessUserAPI.hpp Updated method signature for saveTokenOnDisk and added friend declaration for tests.
BackendlessUserAPI.cpp Modified saveTokenOnDisk to allow an optional parameter override for the token.
Comments suppressed due to low confidence (1)

Tests/test.cpp:48

  • [nitpick] Consider adding an assertion to verify that the token is actually cleared from disk after calling removeTokenFromDisk, in order to improve test coverage.
void BackendlessQtTests::testDisk() {

@@ -102,11 +102,11 @@ void BackendlessUserAPI::readTokenFromDisk() {
file.close();
}

Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a comment or refactoring to clarify the dual behavior of saveTokenOnDisk when an additional value is provided versus when it defaults to userTokenValue.

Suggested change
// Saves a token to disk. If an additional value is provided, it is saved instead of the default userTokenValue.

Copilot uses AI. Check for mistakes.
@RomanPodymov RomanPodymov merged commit 56553b4 into main Apr 30, 2025
1 check passed
@RomanPodymov RomanPodymov deleted the feature/more_tests branch April 30, 2025 21:36
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