feat: add Android host weather runtime facade
This commit is contained in:
@@ -426,6 +426,28 @@ TEST(Source, HostFieldSubmissionBuildsOneCoreOwnedTimeline) {
|
||||
EXPECT_EQ(source.impl().timeline->frame().t0Index, 2u);
|
||||
}
|
||||
|
||||
TEST(Source, HostFieldClearAndTimestampSeekAreFailClosed) {
|
||||
SourceTest test;
|
||||
style::RasterArraySource source{"host-submission"};
|
||||
source.setObserver(&test.styleObserver);
|
||||
source.loadDescription(*test.fileSource);
|
||||
const auto east = fixtureBytes("uniform-east", "field.f32");
|
||||
const auto north = fixtureBytes("uniform-north", "field.f32");
|
||||
const std::vector<char> eastPayload(east.begin(), east.end());
|
||||
const std::vector<char> northPayload(north.begin(), north.end());
|
||||
EXPECT_EQ(source.submitHostField(localMetadata(0), eastPayload), style::RasterArrayHostFieldSubmitResult::AcceptedPendingInitialWindow);
|
||||
EXPECT_TRUE(source.clearHostFields());
|
||||
EXPECT_FALSE(source.impl().field);
|
||||
EXPECT_FALSE(source.impl().timeline);
|
||||
EXPECT_EQ(source.submitHostField(localMetadata(0), eastPayload), style::RasterArrayHostFieldSubmitResult::AcceptedPendingInitialWindow);
|
||||
EXPECT_EQ(source.submitHostField(localMetadata(1), northPayload), style::RasterArrayHostFieldSubmitResult::InitialWindowReady);
|
||||
EXPECT_TRUE(source.seekRuntimeTimelineToTimestamp(202609040050ULL));
|
||||
EXPECT_FLOAT_EQ(source.impl().timeline->frame().mix, 0.5f);
|
||||
EXPECT_FALSE(source.seekRuntimeTimelineToTimestamp(202609039999ULL));
|
||||
EXPECT_TRUE(source.clearHostFields());
|
||||
EXPECT_FALSE(source.seekRuntimeTimelineToTimestamp(202609040050ULL));
|
||||
}
|
||||
|
||||
TEST(Source, HostFieldSubmissionStyleContractCreatesEmptyIngress) {
|
||||
SourceTest test;
|
||||
test.style.loadJSON(R"STYLE({
|
||||
|
||||
Reference in New Issue
Block a user