-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test coverage for mutually exclusive images in ambient (#45)
Adds a missing test for a bug that was fixed by the previous refactoring. However, this was not covered by automated tests, so this change adds the test coverage to ensure this problem will not be introduced in the future.
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
41 changes: 41 additions & 0 deletions
41
...dations/memory-footprint/src/test/resources/layer-split/MutuallyExclusiveBySameListId.xml
This file contains 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,41 @@ | ||
<!-- Tests that mutually exclusive assets are not counted. Here, the same list--> | ||
<!-- configuration id is used in two different nodes. A naive calculator would--> | ||
<!-- find the maximum footprint to be the sum of digital-clock-16 and--> | ||
<!-- digital-clock-32 (48 bytes). However, these two are mutually exclusive because--> | ||
<!-- they are rendered under different options for the same l1 key. Instead, the--> | ||
<!-- true maximum footprint is computed when l1 takes the value l1-2, and it is--> | ||
<!-- digital-clock-2 + digital-clock-32 = 34--> | ||
<WatchFace width="450" height="450"> | ||
<UserConfigurations> | ||
<ListConfiguration id="l1" displayName="list1" defaultValue="l1-1"> | ||
<ListOption id="l1-1" /> | ||
<ListOption id="l1-2" /> | ||
</ListConfiguration> | ||
</UserConfigurations> | ||
<Scene> | ||
<ListConfiguration id="l1"> | ||
<ListOption id="l1-1"> | ||
<DigitalClock> | ||
<Image resource="digital-clock-16" /> | ||
</DigitalClock> | ||
</ListOption> | ||
<ListOption id="l1-2"> | ||
<DigitalClock> | ||
<Image resource="digital-clock-2" /> | ||
</DigitalClock> | ||
</ListOption> | ||
</ListConfiguration> | ||
<ListConfiguration id="l1"> | ||
<ListOption id="l1-1"> | ||
<DigitalClock> | ||
<Image resource="digital-clock-8" /> | ||
</DigitalClock> | ||
</ListOption> | ||
<ListOption id="l1-2"> | ||
<DigitalClock> | ||
<Image resource="digital-clock-32" /> | ||
</DigitalClock> | ||
</ListOption> | ||
</ListConfiguration> | ||
</Scene> | ||
</WatchFace> |