JS tests: changes to kotlin.test + the way compiler tests are generated.

This commit is contained in:
Anton Bannykh
2017-07-18 14:54:45 +03:00
parent eda747c0bf
commit 6ed7eaf546
42 changed files with 1057 additions and 346 deletions
@@ -575,6 +575,17 @@ public class DescriptorUtils {
@NotNull
public static FunctionDescriptor getFunctionByName(@NotNull MemberScope scope, @NotNull Name name) {
FunctionDescriptor result = getFunctionByNameOrNull(scope, name);
if (result == null) {
throw new IllegalStateException("Function not found");
}
return result;
}
@Nullable
public static FunctionDescriptor getFunctionByNameOrNull(@NotNull MemberScope scope, @NotNull Name name) {
Collection<DeclarationDescriptor> functions = scope.getContributedDescriptors(DescriptorKindFilter.FUNCTIONS,
MemberScope.Companion.getALL_NAME_FILTER());
for (DeclarationDescriptor d : functions) {
@@ -583,7 +594,7 @@ public class DescriptorUtils {
}
}
throw new IllegalStateException("Function not found");
return null;
}
@NotNull