ide/editor/src/test/java/org/apidesign/bck2brwsr/ide/editor/ManglingSinkTest.java
2 * Back 2 Browser Bytecode Translator
3 * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. Look for COPYING file in the top folder.
16 * If not, see http://opensource.org/licenses/GPL-2.0.
18 package org.apidesign.bck2brwsr.ide.editor;
20 import org.testng.Assert;
21 import org.testng.annotations.Test;
24 public class ManglingSinkTest {
27 public void testMangle_1() {
29 "binarySearch__I_3BIIB",
30 ManglingSink.mangle("java.util.Arrays", "binarySearch", "[BIIB")
35 public void testMangle_2() {
38 ManglingSink.mangle("java.util.Arrays", "sort", "[I")
43 public void testMangle_3() {
45 "binarySearch__I_3Ljava_lang_Object_2IILjava_lang_Object_2",
46 ManglingSink.mangle("java.util.Arrays", "binarySearch", "[Ljava/lang/Object;IILjava/lang/Object;")
52 public void testField() {
53 final ManglingSink manglingSink = new ManglingSink();
54 manglingSink.field(null, "value");
56 Assert.assertEquals("_value()", manglingSink.toString());