Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for cls (0.12 sec)

  1. guava-testlib/src/com/google/common/testing/ClassSanityTester.java

       *       {@code cls}, instance methods are skipped for nulls test.
       *   <li>Nulls test is not performed on method return values unless the method is a non-private
       *       static factory method whose return type is {@code cls} or {@code cls}'s subtype.
       * </ul>
       */
      public void testNulls(Class<?> cls) {
        try {
          doTestNulls(cls, Visibility.PACKAGE);
        } catch (Exception e) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 08 17:31:55 GMT 2024
    - 33K bytes
    - Viewed (0)
  2. tests/test_generic_parameterless_depends.py

    @app.get("/a")
    async def a(dep: Dep[A]):
        return {"cls": dep.__class__.__name__}
    
    
    @app.get("/b")
    async def b(dep: Dep[B]):
        return {"cls": dep.__class__.__name__}
    
    
    client = TestClient(app)
    
    
    def test_generic_parameterless_depends():
        response = client.get("/a")
        assert response.status_code == 200, response.text
        assert response.json() == {"cls": "A"}
    
        response = client.get("/b")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java

       *       {@code cls}, instance methods are skipped for nulls test.
       *   <li>Nulls test is not performed on method return values unless the method is a non-private
       *       static factory method whose return type is {@code cls} or {@code cls}'s subtype.
       * </ul>
       */
      public void testNulls(Class<?> cls) {
        try {
          doTestNulls(cls, Visibility.PACKAGE);
        } catch (Exception e) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 08 17:31:55 GMT 2024
    - 33K bytes
    - Viewed (0)
  4. fastapi/datastructures.py

        @classmethod
        def __get_validators__(cls: Type["UploadFile"]) -> Iterable[Callable[..., Any]]:
            yield cls.validate
    
        @classmethod
        def validate(cls: Type["UploadFile"], v: Any) -> Any:
            if not isinstance(v, StarletteUploadFile):
                raise ValueError(f"Expected UploadFile, received: {type(v)}")
            return v
    
        @classmethod
        def _validate(cls, __input_value: Any, _: Any) -> "UploadFile":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. fastapi/openapi/models.py

    except ImportError:  # pragma: no cover
    
        class EmailStr(str):  # type: ignore
            @classmethod
            def __get_validators__(cls) -> Iterable[Callable[..., Any]]:
                yield cls.validate
    
            @classmethod
            def validate(cls, v: Any) -> str:
                logger.warning(
                    "email-validator not installed, email fields will be treated as str.\n"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  6. android/guava-tests/test/com/google/common/reflect/ClassPathTest.java

          Iterable<ClassPath.ClassInfo> classes, Class<?> cls) {
        for (ClassPath.ClassInfo classInfo : classes) {
          if (classInfo.getName().equals(cls.getName())) {
            return classInfo;
          }
        }
        throw new AssertionError("failed to find " + cls);
      }
    
      private static ResourceInfo resourceInfo(Class<?> cls) {
        String resource = cls.getName().replace('.', '/') + ".class";
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 26 14:02:27 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  7. maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java

                    constituent.getClassifier(),
                    constituent.getVersion());
        }
    
        private static String getId(String gid, String aid, String type, String cls, String ver) {
            return gid + ':' + aid + ':' + type + ((cls != null && !cls.isEmpty()) ? ':' + cls : "") + ':' + ver;
        }
    
        private void callDelegates(
                ClassRealm classRealm,
                RealmType type,
                ClassLoader parent,
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Jan 10 12:53:42 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

        assertThat(event.response).isNull()
        assertThat(event.t).isSameAs(t)
      }
    
      fun assertFailure(
        cls: Class<out IOException?>?,
        vararg messages: String,
      ) {
        val event = nextEvent() as Failure
        assertThat(event.response).isNull()
        assertThat(event.t.javaClass).isEqualTo(cls)
        if (messages.isNotEmpty()) {
          assertThat(messages).contains(event.t.message)
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/reflect/Types.java

      }
    
      private static void disallowPrimitiveType(Type[] types, String usedAs) {
        for (Type type : types) {
          if (type instanceof Class) {
            Class<?> cls = (Class<?>) type;
            checkArgument(!cls.isPrimitive(), "Primitive type '%s' used as %s", cls, usedAs);
          }
        }
      }
    
      /** Returns the {@code Class} object of arrays with {@code componentType}. */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/net/HttpHeadersTest.java

        }
      }
    
      // Visible for other tests to use
      static ImmutableSet<Field> relevantFields(Class<?> cls) {
        ImmutableSet.Builder<Field> builder = ImmutableSet.builder();
        for (Field field : cls.getDeclaredFields()) {
          /*
           * Coverage mode generates synthetic fields.  If we ever add private
           * fields, they will cause similar problems, and we may want to switch
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 22 21:08:08 GMT 2024
    - 3.9K bytes
    - Viewed (0)
Back to top