microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
brlackey/ising-model-sample

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

library/src/tests/openqasm/angle.rs

19lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4use crate::tests::test_expression;
5use indoc::indoc;
6use qsc::interpret::Value;
7
8#[test]
9fn check_adjust_angle_size_no_truncation_increases_size() {
10 test_expression(
11 indoc! {r#"{
12 import Std.OpenQASM.Angle.*;
13 let angle = IntAsAngle(100, 16);
14 let adjusted_angle = AdjustAngleSizeNoTruncation(angle, 32);
15 adjusted_angle.Size
16 }"#},
17 &Value::Int(32),
18 );
19}
20