Implements JavaToNativeStringMap and adds tests for native API.
Implements JavaToNativeStringMap that is a replacement for JavaToStdMapStrings. It uses a new template method JavaToNativeMap. Also adds testing support for native API and a test for JavaToNativeStringMap. Bug: webrtc:8769 Change-Id: I580d4992a899ebe02da39af450fa51d52ee9b88b Reviewed-on: https://webrtc-review.googlesource.com/48060 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21967}
This commit is contained in:
committed by
Commit Bot
parent
1bc1ec43a3
commit
78498cf5ee
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class JavaTypesTestHelper {
|
||||
@CalledByNative
|
||||
public static Map createTestStringMap() {
|
||||
Map<String, String> testMap = new HashMap<String, String>();
|
||||
testMap.put("one", "1");
|
||||
testMap.put("two", "2");
|
||||
testMap.put("three", "3");
|
||||
return testMap;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user