2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.stmt;
10 import static org.hamcrest.CoreMatchers.allOf;
11 import static org.hamcrest.CoreMatchers.endsWith;
12 import static org.hamcrest.CoreMatchers.startsWith;
14 import org.junit.Test;
16 public class YT1385Test extends AbstractYangTest {
18 public void testSameModuleWrongUnique() {
19 assertSourceException(allOf(
20 startsWith("Following components of unique statement argument refer to non-existent nodes: "
21 + "[Descendant{qnames=[(foo)bar]}] [at "),
22 endsWith("YT1385/foo.yang:7:5]")),
23 "/bugs/YT1385/foo.yang");