testhost

package
v1.17.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testhost holds the platform that gluttertest makes the host's for a test that chose none, so that a test on a Mac or an iOS device runs as Linux in every build mode (SPEC §12.10, the row of defaultTargetPlatform in a test). In a debug build gluttertest uses foundation's override, as Flutter's tests do; a release build has no override (foundation.SetDebugDefaultTargetPlatformOverride panics there), so gluttertest sets the platform here and foundation.DefaultTargetPlatform reads it in every mode.

Only gluttertest sets it; a program that does not link gluttertest never does, and then foundation.DefaultTargetPlatform is the host's. Like foundation's override, it is process-wide state: the framework reads the platform from a function with no binding to ask.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Platform

func Platform() int32

Platform is the platform that a test made the host's, as a foundation.TargetPlatform; 0 is none.

Flutter: no counterpart

func SetPlatform

func SetPlatform(p int32)

SetPlatform makes p, a foundation.TargetPlatform, the host's platform; 0 gives the host its own back.

Flutter: no counterpart

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL