bind_test.go compares the generated Go files against golden files checked in the repository. The bind package formats some of the generated Go files, so any changes in the go formatter can break the tests. This change makes the test more robust by applying formatting based on the currently used go version. Since a golden file often includes multiple go files generated by the bind, the `gofmt` function splits the golden file using the gobindPreamble marker and then run format.Source for each chunk. In order to ease the golden file splitting, this CL also moves the gobindPreamble to the beginning of each generated file consistently. It turned out bind omits formatting for some go files (generated for reverse binding). That needs to be fixed but it is a much bigger fix. Thus, in this CL, we apply the formatting on the bind's output as well. This CL also updates the gobindPreamble to follow the style guide for generated code. https://golang.org/s/generatedcode Fixes golang/go#34619 Change-Id: Ia2957693154face2848e051ebbb2373e95d79593 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/198322 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
162 lines
4.7 KiB
Plaintext
162 lines
4.7 KiB
Plaintext
// Code generated by gobind. DO NOT EDIT.
|
|
|
|
// Java class keywords.KeywordCaller is a proxy for talking to a Go program.
|
|
//
|
|
// autogenerated by gobind -lang=java keywords
|
|
package keywords;
|
|
|
|
import go.Seq;
|
|
|
|
public interface KeywordCaller {
|
|
public void abstract_();
|
|
public void assert_();
|
|
public void bool();
|
|
public void boolean_();
|
|
public void break_();
|
|
public void byte_();
|
|
public void case_();
|
|
public void catch_();
|
|
public void char_();
|
|
public void class_();
|
|
public void const_();
|
|
public void continue_();
|
|
public void default_();
|
|
public void do_();
|
|
public void double_();
|
|
public void else_();
|
|
public void enum_();
|
|
public void extends_();
|
|
public void false_();
|
|
public void final_();
|
|
public void finally_();
|
|
public void float_();
|
|
public void for_();
|
|
public void goto_();
|
|
public void if_();
|
|
public void implements_();
|
|
public void import_();
|
|
public void instanceof_();
|
|
public void int_();
|
|
public void interface_();
|
|
public void long_();
|
|
public void native_();
|
|
public void new_();
|
|
public void nil();
|
|
public void null_();
|
|
public void package_();
|
|
public void private_();
|
|
public void protected_();
|
|
public void public_();
|
|
public void return_();
|
|
public void short_();
|
|
public void static_();
|
|
public void strictfp_();
|
|
public void super_();
|
|
public void switch_();
|
|
public void synchronized_();
|
|
public void this_();
|
|
public void throw_();
|
|
public void throws_();
|
|
public void transient_();
|
|
public void true_();
|
|
public void try_();
|
|
public void void_();
|
|
public void volatile_();
|
|
public void while_();
|
|
|
|
}
|
|
|
|
// Code generated by gobind. DO NOT EDIT.
|
|
|
|
// Java class keywords.Keywords is a proxy for talking to a Go program.
|
|
//
|
|
// autogenerated by gobind -lang=java keywords
|
|
package keywords;
|
|
|
|
import go.Seq;
|
|
|
|
public abstract class Keywords {
|
|
static {
|
|
Seq.touch(); // for loading the native library
|
|
_init();
|
|
}
|
|
|
|
private Keywords() {} // uninstantiable
|
|
|
|
// touch is called from other bound packages to initialize this package
|
|
public static void touch() {}
|
|
|
|
private static native void _init();
|
|
|
|
private static final class proxyKeywordCaller implements Seq.Proxy, KeywordCaller {
|
|
private final int refnum;
|
|
|
|
@Override public final int incRefnum() {
|
|
Seq.incGoRef(refnum, this);
|
|
return refnum;
|
|
}
|
|
|
|
proxyKeywordCaller(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
|
|
|
|
public native void abstract_();
|
|
public native void assert_();
|
|
public native void bool();
|
|
public native void boolean_();
|
|
public native void break_();
|
|
public native void byte_();
|
|
public native void case_();
|
|
public native void catch_();
|
|
public native void char_();
|
|
public native void class_();
|
|
public native void const_();
|
|
public native void continue_();
|
|
public native void default_();
|
|
public native void do_();
|
|
public native void double_();
|
|
public native void else_();
|
|
public native void enum_();
|
|
public native void extends_();
|
|
public native void false_();
|
|
public native void final_();
|
|
public native void finally_();
|
|
public native void float_();
|
|
public native void for_();
|
|
public native void goto_();
|
|
public native void if_();
|
|
public native void implements_();
|
|
public native void import_();
|
|
public native void instanceof_();
|
|
public native void int_();
|
|
public native void interface_();
|
|
public native void long_();
|
|
public native void native_();
|
|
public native void new_();
|
|
public native void nil();
|
|
public native void null_();
|
|
public native void package_();
|
|
public native void private_();
|
|
public native void protected_();
|
|
public native void public_();
|
|
public native void return_();
|
|
public native void short_();
|
|
public native void static_();
|
|
public native void strictfp_();
|
|
public native void super_();
|
|
public native void switch_();
|
|
public native void synchronized_();
|
|
public native void this_();
|
|
public native void throw_();
|
|
public native void throws_();
|
|
public native void transient_();
|
|
public native void true_();
|
|
public native void try_();
|
|
public native void void_();
|
|
public native void volatile_();
|
|
public native void while_();
|
|
}
|
|
|
|
|
|
public static native void const_(String id);
|
|
public static native void static_(String strictfp_);
|
|
}
|