Skip to content

#2119. Code format and description update in operator tests #2238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/// A superclass of C cannot declare such an initializer either, because it must
/// necessarily declare constant constructor as well (unless it is Object, which
/// declares no instance variables)
///
/// @description Checks that compile error is produced if class declares a
/// constant constructor and its superclass has instance variable initialized
/// by non-constant expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
/// by a class C if any instance variable declared in C is initialized with an
/// expression that is not a constant expression.
/// A superclass of C cannot declare such an initializer either, because it must
/// necessarily declare constant constructor as well (unless it is Object, which declares
/// no instance variables)
/// necessarily declare constant constructor as well (unless it is Object, which
/// declares no instance variables)
///
/// @description Checks that compile error is produced if class declares a
/// constant constructor and its superclass has overriden instance variable
/// constant constructor and its superclass has overridden instance variable
/// initialized by non-constant expression.
/// @author sgrekhov@unipro.ru

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
/// by a class C if any instance variable declared in C is initialized with an
/// expression that is not a constant expression.
/// A superclass of C cannot declare such an initializer either, because it must
/// necessarily declare constant constructor as well (unless it is Object, which declares
/// no instance variables)
/// necessarily declare constant constructor as well (unless it is Object, which
/// declares no instance variables)
///
/// @description Checks that compile error is produced if class declares a
/// constant constructor and its superclass has instance variable initialized
/// by non-constant expression. Test type alias
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that the listed operators may indeed be defined in a
/// user class.
/// @author vasya


import "../../../../Utils/expect.dart";

class C {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator != cannot be defined in a user class.
/// @author vasya


class C {
operator !=(other) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator !== cannot be defined in a user class.
/// @author iefremov



class C {
operator !==(other) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator === cannot be defined in a user class.
/// @author iefremov


class C {
operator ===(other) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator ! cannot be defined in a user class.
/// @author iefremov


class C {
bool operator !() {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator = cannot be defined in a user class.


class C {
operator =(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator += cannot be defined in a user class.
/// @author iefremov


class C {
operator +=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator -= cannot be defined in a user class.
/// @author iefremov


class C {
operator -=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator *= cannot be defined in a user class.
/// @author iefremov


class C {
operator *=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator /= cannot be defined in a user class.
/// @author iefremov


class C {
operator /=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator ~/= cannot be defined in a user class.
/// @author iefremov


class C {
operator ~/=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator %= cannot be defined in a user class.
/// @author iefremov


class C {
operator %=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator <<= cannot be defined in a user class.
/// @author iefremov


class C {
operator <<=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator >>= cannot be defined in a user class.
/// @author iefremov


class C {
operator >>=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator &= cannot be defined in a user class.
/// @author iefremov


class C {
operator &=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator |= cannot be defined in a user class.
/// @author iefremov


class C {
operator |=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator ^= cannot be defined in a user class.
/// @author iefremov


class C {
operator ^=(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator ++ cannot be defined in a user class.
/// @author iefremov


class C {
operator ++() {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator -- cannot be defined in a user class.
/// @author iefremov


class C {
operator --() {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator is cannot be defined in a user class.
/// @author iefremov


class C {
operator is(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator && cannot be defined in a user class.
/// @author iefremov


class C {
operator &&(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator || cannot be defined in a user class.
/// @author iefremov


class C {
operator ||(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

/// @assertion The following names are allowed for user-defined operators:
/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜.
///
/// @description Checks that operator <<< cannot be defined in a user class.
/// @author iefremov


class C {
operator <<<(x) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
/// The - operator is unique in that two overloaded versions are permitted.
/// If the operator has no arguments, it denotes unary minus.
/// If it as an argument, it denotes binary subtraction.
/// @description Checks that operator - can be defined both with 0 and 1
///
/// @description Checks that operator `-` can be defined both with 0 and 1
/// arguments.
/// @author kaigorodov

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
/// The - operator is unique in that two overloaded versions are permitted.
/// If the operator has no arguments, it denotes unary minus.
/// If it as an argument, it denotes binary subtraction.
///
/// @description Checks that a compile-time error is produced if a user-defined
/// operator - specifies two parameters.
/// operator `-` specifies two parameters.
/// @author kaigorodov


class C {
operator -(var val, var val2) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

/// @assertion It is a compile-time error if the arity of the user-declared
/// operator ~ is not 0.
///
/// @description Checks that no compile-time error is produced if a user-defined
/// operator ~ specifies zero parameters.
/// @author kaigorodov
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

/// @assertion It is a compile-time error if the arity of the user-declared
/// operator ~ is not 0.
///
/// @description Checks that a compile-time error is produced if a user-defined
/// operator ~ specifies one parameter.
/// @author vasya


class C {
operator ~(var v) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
/// @assertion It is a compile-time error if the arity of a user-declared
/// operator with one of the names:
/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1.
///
/// @description Checks that a compile-time error is produced if a user-defined
/// operator == specifies two parameters.
/// @author vasya


class C {
operator ==(var val, var val2) => true;
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
/// @assertion It is a compile-time error if the arity of a user-declared
/// operator with one of the names:
/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1.
///
/// @description Checks that a compile-time error is produced if a user-defined
/// operator < specifies two parameters.
/// @author vasya


class C {
operator <(var val, var val2) {}
// ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
/// @assertion It is a compile-time error if the arity of a user-declared
/// operator with one of the names:
/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1.
///
/// @description Checks that a compile-time error is produced if a user-defined
/// operator > specifies two parameters.
/// @author vasya


class C {
operator >(var val, var val2) {}
// ^
Expand Down
Loading