(Prism.languages.openqasm = {
comment: /\/\*[\s\S]*?\*\/|\/\/.*/,
string: { pattern: /"[^"\r\n\t]*"|'[^'\r\n\t]*'/, greedy: !0 },
keyword:
/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,
'class-name':
/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,
function: /\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,
constant: /\b(?:euler|pi|tau)\b|ฯ|๐|โ/,
number: {
pattern:
/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|ยตs|ms|s)?/i,
lookbehind: !0,
},
operator: /->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,
punctuation: /[(){}\[\];,:.]/,
}),
(Prism.languages.qasm = Prism.languages.openqasm);
armandphilippot.com
blob: a04a976807907b472d95c2a09cdbc5e81dd93bea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { render, screen } from '@test-utils';
import Field from './field';
describe('Field', () => {
it('renders a text input', () => {
render(
<Field
id="text-field"
name="text-field"
type="text"
value=""
setValue={() => null}
/>
);
expect(screen.getByRole('textbox')).toHaveAttribute('type', 'text');
});
it('renders a search input', () => {
render(
<Field
id="search-field"
name="search-field"
type="search"
value=""
setValue={() => null}
/>
);
expect(screen.getByRole('searchbox')).toHaveAttribute('type', 'search');
});
});
|