@@ -10,6 +10,14 @@ namespace Microsoft.Android.Build.BaseTasks.Tests
10
10
public class AndroidRidAbiHelperTests
11
11
{
12
12
static object [ ] StringValueSource = new object [ ] {
13
+ new [ ] {
14
+ /* input */ default ( string ) ,
15
+ /* expected */ default ( string )
16
+ } ,
17
+ new [ ] {
18
+ /* input */ "" ,
19
+ /* expected */ default
20
+ } ,
13
21
new [ ] {
14
22
/* input */ "armeabi-v7a/libfoo.so" ,
15
23
/* expected */ "armeabi-v7a"
@@ -65,7 +73,15 @@ public class AndroidRidAbiHelperTests
65
73
new [ ] {
66
74
/* input */ "packages/sqlitepclraw.lib.e_sqlite3.android/1.1.11/runtimes/android-arm64/native/libe_sqlite3.so" ,
67
75
/* expected */ "arm64-v8a"
68
- }
76
+ } ,
77
+ new [ ] {
78
+ /* input */ "arm64-v8a\\ libfoo.so" ,
79
+ /* expected */ "arm64-v8a"
80
+ } ,
81
+ new [ ] {
82
+ /* input */ "android-arm64\\ libfoo.so" ,
83
+ /* expected */ "arm64-v8a"
84
+ } ,
69
85
} ;
70
86
71
87
[ Test ]
@@ -76,6 +92,12 @@ public void StringValue (string input, string expected)
76
92
}
77
93
78
94
static object [ ] ITaskItemValueSource = new object [ ] {
95
+ new object [ ] {
96
+ /* input */
97
+ new TaskItem ( "" ) ,
98
+ /* expected */
99
+ default ( string )
100
+ } ,
79
101
new object [ ] {
80
102
/* input */
81
103
new TaskItem ( "armeabi-v7a/libfoo.so" ) ,
@@ -130,6 +152,22 @@ public void StringValue (string input, string expected)
130
152
/* expected */
131
153
"armeabi-v7a"
132
154
} ,
155
+ new object [ ] {
156
+ /* input */
157
+ new TaskItem ( "liblinkwin.so" , new Dictionary < string , string > {
158
+ { "Link" , "x86_64\\ libfoo.so" }
159
+ } ) ,
160
+ /* expected */
161
+ "x86_64"
162
+ } ,
163
+ new object [ ] {
164
+ /* input */
165
+ new TaskItem ( "liblinkwin.so" , new Dictionary < string , string > {
166
+ { "Link" , "android-arm64\\ libfoo.so" } ,
167
+ } ) ,
168
+ /* expected */
169
+ "arm64-v8a" ,
170
+ } ,
133
171
} ;
134
172
135
173
[ Test ]
0 commit comments