Skip to content

[AI] Add GenerationConfig.merge(_:with:) unit tests - #15918

Merged
andrewheard merged 30 commits into
mainfrom
ah/ai-genconfig-merge-tests
Mar 10, 2026
Merged

[AI] Add GenerationConfig.merge(_:with:) unit tests#15918
andrewheard merged 30 commits into
mainfrom
ah/ai-genconfig-merge-tests

Conversation

@andrewheard

Copy link
Copy Markdown
Contributor

Added unit tests for the GenerationConfig.merge(_:with:) static method added in #15872 since it only has basic coverage from the the integration tests.

#no-changelog

andrewheard and others added 25 commits February 20, 2026 17:34
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…firebase-ios-sdk into ah/ai-generative-model-session

# Conflicts:
#	FirebaseAI/Tests/TestApp/Tests/Integration/GenerativeModelSessionTests.swift
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a good set of unit tests for the GenerationConfig.merge method, covering various scenarios including nil inputs, property merging, and schema precedence. The tests are clear and well-structured. I've added a couple of minor suggestions to make some assertions more specific, which will improve the robustness of the tests.

Comment thread FirebaseAI/Tests/Unit/GenerationConfigTests.swift Outdated
Comment thread FirebaseAI/Tests/Unit/GenerationConfigTests.swift Outdated
andrewheard and others added 2 commits March 10, 2026 00:19
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@andrewheard

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a comprehensive suite of unit tests for the GenerationConfig.merge(_:with:) method, significantly improving test coverage for this functionality. The new tests cover various scenarios, including nil inputs, property merging, and schema precedence rules. The tests are well-structured and clear. I've provided a couple of minor suggestions to enhance the robustness of two test cases, but overall, this is a solid contribution to the project's test suite.

Comment thread FirebaseAI/Tests/Unit/GenerationConfigTests.swift
Comment thread FirebaseAI/Tests/Unit/GenerationConfigTests.swift
Base automatically changed from ah/ai-generative-model-session to main March 10, 2026 04:51
@andrewheard
andrewheard requested a review from a team as a code owner March 10, 2026 04:51
@andrewheard
andrewheard merged commit dd1ee29 into main Mar 10, 2026
91 checks passed
@andrewheard
andrewheard deleted the ah/ai-genconfig-merge-tests branch March 10, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants