android_packages_modules_Co.../staticlibs/testutils/hostdevice/com/android
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chalard Jean b6fdf63095 tryTest to return its last evaluated expression
This is the same thing try{} does, and allows to lift
return out of tryTest.

This allows syntaxes likeĀ :
fun foo() = try {
    "Foo";
  } cleanup {
    doSomeCleanup()
  }
}

val network = try {
    registerNetworkCallback
    callback.getNetwork()
  } cleanup {
    unregisterNetworkCallback
  }
}

Note: bypassing ktlint because of b/185077240

Test: FrameworksNetTests
Change-Id: Ib8f6fde7ccfd62fdcb3c1e3b7b03909ed94d4b23
2021-11-25 16:26:42 +09:00
..
net/module/util Move net-test-utils to its own directory 2021-03-30 16:52:09 +09:00
testutils tryTest to return its last evaluated expression 2021-11-25 16:26:42 +09:00