Skip to content

Commit 5b78608

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Migrate Shadows -> Kotlin (#37563)
Summary: Pull Request resolved: #37563 This diff migrates the Shadows project into kotlin changelog: [internal] internal Reviewed By: cortinico Differential Revision: D45679204 fbshipit-source-id: eede61e725d6f4dc21d23176d2e9f72f3726f1c8
1 parent d45d15f commit 5b78608

File tree

4 files changed

+44
-46
lines changed

4 files changed

+44
-46
lines changed

packages/react-native/ReactAndroid/src/test/java/com/facebook/testutils/shadows/ShadowArguments.java

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
package com.facebook.testutils.shadows
9+
10+
import com.facebook.react.bridge.Arguments
11+
import com.facebook.react.bridge.JavaOnlyMap
12+
import com.facebook.react.bridge.WritableMap
13+
import org.robolectric.annotation.Implementation
14+
import org.robolectric.annotation.Implements
15+
16+
@Implements(Arguments::class)
17+
class ShadowArguments {
18+
companion object {
19+
@JvmStatic @Implementation fun createMap(): WritableMap = JavaOnlyMap()
20+
}
21+
}

packages/react-native/ReactAndroid/src/test/java/com/facebook/testutils/shadows/ShadowSoLoader.java

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
package com.facebook.testutils.shadows
9+
10+
import android.content.Context
11+
import com.facebook.soloader.SoLoader
12+
import kotlin.jvm.JvmStatic
13+
import org.robolectric.annotation.Implementation
14+
import org.robolectric.annotation.Implements
15+
16+
@Implements(SoLoader::class)
17+
class ShadowSoLoader {
18+
companion object {
19+
@JvmStatic @Implementation fun init(context: Context?, flags: Int) {}
20+
21+
@JvmStatic @Implementation fun loadLibrary(shortName: String?): Boolean = true
22+
}
23+
}

0 commit comments

Comments
 (0)