| library #lib; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:io" as io; |
| |
| import "dart:io"; |
| |
| class TestPlatform extends core::_Enum /*isEnum*/ { |
| static const field core::List<self::TestPlatform> values = #C19; |
| enum-element static const field self::TestPlatform android = #C3; |
| enum-element static const field self::TestPlatform fuchsia = #C6; |
| enum-element static const field self::TestPlatform ios = #C9; |
| enum-element static const field self::TestPlatform linux = #C12; |
| enum-element static const field self::TestPlatform macos = #C15; |
| enum-element static const field self::TestPlatform windows = #C18; |
| const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform |
| : super core::_Enum::•(#index, #name) |
| ; |
| method _enumToString() → core::String |
| return "TestPlatform.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| static const field core::bool kDebugMode = #C20; |
| static field self::TestPlatform? debugDefaultTestPlatform; |
| static const field core::bool enableAsserts = #C21; |
| @#C24 |
| static final field core::bool isLinuxOrAndroid = #C20; |
| @#C24 |
| static final field core::bool isIOSOrMacOS = #C21; |
| static method testAndroid(core::int i) → void { |
| final core::bool b = #C20; |
| core::print(b); |
| } |
| static method testFuchsia(core::int i) → void { |
| final core::bool b = #C20; |
| core::print(b); |
| } |
| static method testIOS(core::int i) → void { |
| final core::bool b = #C20; |
| core::print(b); |
| } |
| static method testLinux(core::int i) → void { |
| final core::bool b = #C20; |
| core::print(b); |
| } |
| static method testMacOS(core::int i) → void { |
| final core::bool b = #C21; |
| core::print(b); |
| { |
| final core::String os = #C14; |
| core::print(os); |
| final core::String sep = #C25; |
| core::print(sep); |
| } |
| } |
| static method testWindows(core::int i) → void { |
| final core::bool b = #C20; |
| core::print(b); |
| } |
| static method testSwitchStatements(core::int i) → void { |
| #L1: |
| { |
| core::print("is macos"); |
| break #L1; |
| } |
| } |
| @#C24 |
| static get defaultTestPlatform() → self::TestPlatform |
| return #C15; |
| static method testPragma(core::int i) → void { |
| core::print(#C15); |
| #L2: |
| { |
| core::print("is macos"); |
| break #L2; |
| } |
| } |
| @#C27 |
| static get defaultTestPlatformOverridableWhenDebug() → self::TestPlatform |
| return #C15; |
| static method testConditionalPragma(core::int i) → void { |
| core::print(#C15); |
| #L3: |
| { |
| core::print("is macos"); |
| break #L3; |
| } |
| } |
| @#C28 |
| static get defaultTestPlatformOverridableWithAsserts() → self::TestPlatform { |
| late self::TestPlatform result; |
| { |
| result = #C15; |
| } |
| assert((() → core::bool { |
| if(io::Platform::environment.{core::Map::containsKey}("FLUTTER_TEST"){(core::Object?) → core::bool}) { |
| result = #C3; |
| } |
| return true; |
| })(){() → core::bool}); |
| return result; |
| } |
| static method testConditionalPragmaWithAsserts(core::int i) → void { |
| core::print(self::defaultTestPlatformOverridableWithAsserts); |
| #L4: |
| switch(self::defaultTestPlatformOverridableWithAsserts) /* isExplicitlyExhaustive, self::TestPlatform */ { |
| #L5: |
| case #C3: |
| { |
| core::print("is android"); |
| break #L4; |
| } |
| #L6: |
| case #C6: |
| { |
| core::print("is fuchsia"); |
| break #L4; |
| } |
| #L7: |
| case #C9: |
| { |
| core::print("is ios"); |
| break #L4; |
| } |
| #L8: |
| case #C12: |
| { |
| core::print("is linux"); |
| break #L4; |
| } |
| #L9: |
| case #C15: |
| { |
| core::print("is macos"); |
| break #L4; |
| } |
| #L10: |
| case #C18: |
| { |
| core::print("is windows"); |
| break #L4; |
| } |
| } |
| } |
| static method testFields(core::int i) → void { |
| core::print(#C20); |
| core::print(#C21); |
| } |
| static method main(core::List<core::String> args) → dynamic { |
| if(args.{core::Iterable::isEmpty}{core::bool}) |
| return; |
| final core::int i = core::int::parse(args.{core::List::[]}(0){(core::int) → core::String}); |
| self::testAndroid(i); |
| self::testFuchsia(i); |
| self::testIOS(i); |
| self::testLinux(i); |
| self::testMacOS(i); |
| self::testWindows(i); |
| self::testSwitchStatements(i); |
| self::testPragma(i); |
| self::debugDefaultTestPlatform = #C3; |
| self::testConditionalPragma(i); |
| self::testConditionalPragmaWithAsserts(i); |
| self::testFields(i); |
| } |
| constants { |
| #C1 = 0 |
| #C2 = "android" |
| #C3 = self::TestPlatform {index:#C1, _name:#C2} |
| #C4 = 1 |
| #C5 = "fuchsia" |
| #C6 = self::TestPlatform {index:#C4, _name:#C5} |
| #C7 = 2 |
| #C8 = "ios" |
| #C9 = self::TestPlatform {index:#C7, _name:#C8} |
| #C10 = 3 |
| #C11 = "linux" |
| #C12 = self::TestPlatform {index:#C10, _name:#C11} |
| #C13 = 4 |
| #C14 = "macos" |
| #C15 = self::TestPlatform {index:#C13, _name:#C14} |
| #C16 = 5 |
| #C17 = "windows" |
| #C18 = self::TestPlatform {index:#C16, _name:#C17} |
| #C19 = <self::TestPlatform>[#C3, #C6, #C9, #C12, #C15, #C18] |
| #C20 = false |
| #C21 = true |
| #C22 = "vm:platform-const" |
| #C23 = null |
| #C24 = core::pragma {name:#C22, options:#C23} |
| #C25 = "/" |
| #C26 = "vm:platform-const-if" |
| #C27 = core::pragma {name:#C26, options:#C21} |
| #C28 = core::pragma {name:#C26, options:#C20} |
| } |