Skip to content

[tizen_bundle] Add integration tests#1051

Merged
seungsoo47 merged 5 commits into
flutter-tizen:masterfrom
seungsoo47:tizen_bundle-add-integration-tests
Jul 1, 2026
Merged

[tizen_bundle] Add integration tests#1051
seungsoo47 merged 5 commits into
flutter-tizen:masterfrom
seungsoo47:tizen_bundle-add-integration-tests

Conversation

@seungsoo47

@seungsoo47 seungsoo47 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Add regression integration tests covering the public API of tizen_bundle:

  • Bundle(), Bundle.fromMap, Bundle.fromBundle, Bundle.decode
  • operator[] (get/set), remove(), clear()
  • length, isEmpty, isNotEmpty, keys
  • Inherited MapMixin members (containsKey, containsValue, entries, forEach, addAll, putIfAbsent)

Validated on RPi4 and TV emulator.

#1039

- Bundle() default constructor: creates empty bundle with length 0, isEmpty, isNotEmpty, keys empty
- Bundle.fromMap: creates empty bundle from empty map
- Bundle.fromBundle copy independence: mutating original does not affect copy; adding to copy does not affect original
- Bundle.decode: round-trips List<String>, Uint8List, and mixed types through encode/decode
- operator[] (get): returns null for missing/null key, returns updated value, idempotent reads
- operator[]= (set): throws ArgumentError for unsupported type, stores empty string, single-element list, empty Uint8List, full byte range 0x00–0xff
- remove(): no-op for null, throws PlatformException for non-existent key, state transition after add/remove
- clear(): idempotent on empty bundle, removes all mixed-type entries
- length/isEmpty/isNotEmpty: reflect correct counts through add/remove operations
- inherited MapMixin: containsKey, containsValue, entries, forEach, addAll, putIfAbsent
Update integration test suite to 37 test cases.

@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 updates the integration test suite for the tizen_bundle package, replacing the previous test file with a comprehensive set of 37 test cases covering constructors, operators, state transitions, and inherited MapMixin members. Feedback suggests updating the remove method to return normally instead of throwing a PlatformException when a key is missing, aligning with the standard Dart Map contract. Additionally, it is recommended to add a test verifying that the keys property of different Bundle instances remains independent.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/tizen_bundle/example/integration_test/tizen_bundle_test.dart Outdated
Fix remove() to be a no-op when the key does not exist, matching the
standard Map.remove() contract. Previously, removing a non-existent key
threw a PlatformException (BUNDLE_ERROR_KEY_NOT_AVAILABLE).

Fix the keys getter to return an independent list per call. Previously,
it returned a reference to a shared static list, so calling keys on any
Bundle instance would overwrite the result of a prior call on another
instance.
Update the remove() test to assert it is a no-op for a non-existent key.
Add a test verifying that keys from different Bundle instances are
independent (no shared static list interference).
Remove the now-unused flutter/services.dart import.
@seungsoo47 seungsoo47 merged commit 6755e4b into flutter-tizen:master Jul 1, 2026
6 checks passed
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