Skip to content

Commit

Permalink
remove unnecessary api in main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna committed Dec 16, 2024
1 parent 16a2aed commit 214097c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
10 changes: 5 additions & 5 deletions compiler/qsc_passes/src/test_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ mod tests;

#[derive(Clone, Debug, Diagnostic, Error)]
pub enum TestAttributeError {
#[error("This callable has parameters. Tests cannot have parameters.")]
#[error("test callables cannot take arguments")]
CallableHasParameters(#[label] Span),
#[error("This callable has type parameters. Tests cannot have type parameters.")]
CallableHaSTypeParameters(#[label] Span),
#[error("test callables cannot have type parameters")]
CallableHasTypeParameters(#[label] Span),
}

pub(crate) fn validate_test_attributes(
Expand All @@ -34,11 +34,11 @@ impl<'a> Visitor<'a> for TestAttributeValidator {
if decl.attrs.iter().any(|attr| matches!(attr, Attr::Test)) {
if !decl.generics.is_empty() {
self.errors
.push(TestAttributeError::CallableHaSTypeParameters(decl.span));
.push(TestAttributeError::CallableHasTypeParameters(decl.name.span));
}
if decl.input.ty != qsc_hir::ty::Ty::UNIT {
self.errors
.push(TestAttributeError::CallableHasParameters(decl.span));
.push(TestAttributeError::CallableHasParameters(decl.name.span));
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions npm/qsharp/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,4 @@ export function getLanguageServiceWorker(): ILanguageServiceWorker {
);
}

export function collectTestCallables(config: IProgramConfig): string[] {
ensureWasm();
return wasm!.collect_test_callables(config);
}

export * as utils from "./utils.js";
1 change: 1 addition & 0 deletions vscode/src/testExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ function startWatchingWorkspace(
watcher.onDidCreate(async () => {
await refresher();
});

watcher.onDidChange(async () => {
await refresher();
});
Expand Down

0 comments on commit 214097c

Please sign in to comment.