@@ -10,6 +10,14 @@ namespace Microsoft.Android.Build.BaseTasks.Tests
1010 public class AndroidRidAbiHelperTests
1111 {
1212 static object [ ] StringValueSource = new object [ ] {
13+ new [ ] {
14+ /* input */ default ( string ) ,
15+ /* expected */ default ( string )
16+ } ,
17+ new [ ] {
18+ /* input */ "" ,
19+ /* expected */ default
20+ } ,
1321 new [ ] {
1422 /* input */ "armeabi-v7a/libfoo.so" ,
1523 /* expected */ "armeabi-v7a"
@@ -65,7 +73,15 @@ public class AndroidRidAbiHelperTests
6573 new [ ] {
6674 /* input */ "packages/sqlitepclraw.lib.e_sqlite3.android/1.1.11/runtimes/android-arm64/native/libe_sqlite3.so" ,
6775 /* 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+ } ,
6985 } ;
7086
7187 [ Test ]
@@ -76,6 +92,12 @@ public void StringValue (string input, string expected)
7692 }
7793
7894 static object [ ] ITaskItemValueSource = new object [ ] {
95+ new object [ ] {
96+ /* input */
97+ new TaskItem ( "" ) ,
98+ /* expected */
99+ default ( string )
100+ } ,
79101 new object [ ] {
80102 /* input */
81103 new TaskItem ( "armeabi-v7a/libfoo.so" ) ,
@@ -130,6 +152,22 @@ public void StringValue (string input, string expected)
130152 /* expected */
131153 "armeabi-v7a"
132154 } ,
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+ } ,
133171 } ;
134172
135173 [ Test ]
0 commit comments