#assert

Felix Palmen :freebsd: :c64:zirias@bsd.cafe
2025-06-18

Yep, there's a second bug. #clang #thread #sanitizer had nothing to complain, and the output from #assert doesn't help much. So, first step: "pimp your assert" 😂 --- #FreeBSD, like some other systems, provides functions to collect and print rudimentary stacktraces, use these if available:
github.com/Zirias/poser/commit

Now I got closer, see screenshot. That's enough to understand, the issue is with the global event firing when a #child #process exits, this was used from multiple threads. Ok, it obviously doesn't work that way, so, back to the drawing board regarding my handling for child processes... 🤔

Next #swad release: Soon, so I hope 🙈

swad printing a stacktrace for a failed assert, filtering that with "addr2line" to obtain more useful information.
2025-05-27

[Перевод] Один assert на тест. А может быть, нет?

Команда Spring АйО перевела статью эксперта Михаила Поливахи о том, почему правило о единственном assert'е на тест иногда можно и нужно нарушать.

habr.com/ru/companies/spring_a

#java #kotlin #assert #test #spring #spring_boot #spring_framework #springboot #testing #testing_strategy

2025-03-07

Design by Contract на минималках: пишем assertions и улучшаем устойчивость на Go

Всем привет! Меня зовут Александр Иванов, я старший разработчик в YADRO, работаю над созданием средств управления элементами опорной сети и пишу на Go. Мы с командой разрабатываем продукт для сервисов сотовой связи — качество нашей работы влияет на пользовательский опыт тысяч людей. Поэтому часто мы ищем решения, как повысить устойчивость работы кода в продакшене. Об одном из таких решений я расскажу в этой статье. Design by Contract — подход к проектированию ПО, в котором взаимодействие компонентов системы основано на контрактах. Контракты описывают ожидания вызываемой и вызывающей функции и улучшают производительность кода.

habr.com/ru/companies/yadro/ar

#dbc #design_by_contract #defensive_programming #assertion #assert #продакшен #производительность

CINEA🇪🇺 Clean Energycleanenergy_EU@respublicae.eu
2025-02-07

RT by @cleanenergy_EU: 📌Open Call: Apply for mentorship programme to address #energypoverty for persons with disabilities.
#ASSERT is looking for 25 pairs of municipalities & intermediaries across five pilot countries🌐Cyprus, France, Greece, Italy, Spain
⏲️Apply by 3 March
🖱️energy-poverty.ec.europa.eu/no
---
nitter.privacydev.net/EPAH_EU/

2025-01-23

Почему мы отказались от выражения «assert» в Python

В текущем проекте на Python мы практически полностью отказались от использования выражений с ключевым словом assert , и в этой статье я расскажу почему. Рассмотрим кейсы где использование выражений assert уместно, а где оно может выстрелить в ногу, и как этого избежать.

habr.com/ru/articles/876170/

#python #assert #exception #исключения #pytest #pydantic #линтер #интерпретатор #баги #ошибки

Rui Nibau (rnb)rnb@framapiaf.org
2024-12-15

[blog] Tester en javasscript

Poursuite de mes réflexions sur la manière de faire des tests unitaires en javascript rapidement sans devoir utiliser de librairies tiers, simplement avec console.assert.

Aujourd'hui, rajouter un peu de couleur dans la console.

omacronides.com/notes/2024-12-

#javascript #test #assert #code

Sortie de la console web après lancement d'une série de tests unitaires, où les tests en erreur apparaissent en jaune, la valeur en erreur en rouge et la valeur attendue en vert
2024-11-18

Эволюция Assert'a на примере тестирования вездехода из Звездных Войн

Привет, Хабр! Меня зовут Михаил Палыга, я инженер в Блоке обеспечения и контроля качества выпуска изменений ПО в РСХБ‑Интех. На проекте для проверки данных мы пользуемся библиотекой AssertJ — Java библиотекой с открытым исходным кодом, используемой для написания гибких, содержательных и легко читаемых проверок в тестах Java. Мы любим использовать цепочки методов в других наших классах, поэтому данная библиотека органично вписалась в код наших тестов. Я опишу, как со временем менялся наш подход к проведению проверок данных и как менялись сами классы проверок. А чтобы было чуть проще и интересней — займемся тестированием чего‑нибудь из вселенной Звездных Войн. Например, протестируем имперский бронированный транспортный вездеход AT‑AT.

habr.com/ru/companies/rshb/art

#автоматизация_тестирования #assertj #assert

Joel Parker Hendersonjoelparkerhenderson
2024-11-12

For Rust developers: Assertables is a Rust crate of assert macros for assertion testing. Improve your compile-time tests and run-time reliability.

github.com/sixarm/assertables-

2024-07-30

[Перевод] Soft Assertions в AssertJ

Бывало ли у вас такое, что тест падает на первом же assertion'e из десяти? Вы исправляете ошибку, запускаете тест снова, и он падает на втором assertion'e. И так десять раз. Выматывает, не так ли? На самом деле, есть способ ускорить этот процесс — использовать Soft Assertions. С их помощью тест выполнится полностью, даже если один или несколько assertion'ов упадут, и вы сразу увидите все ошибки. В новой статье от Михаила Поливахи, эксперта сообщества Spring АйО , вы узнаете, что такое Soft Assertions и как ими пользоваться.

habr.com/ru/companies/spring_a

#spring #springboot #java #assert #assertj

Zelphir Kaltstahlzelphirkaltstahl
2024-03-20

With the help of some people on the user list (thanks!), I was able to make sense of the `assert` from okmij.org [1]. I wrote a lot of comments and insights, so that at a later point future me or anyone else might find it easier to understand what is going on [2].

[1]: okmij.org/ftp/Scheme/assert-sy
[2]: codeberg.org/ZelphirKaltstahl/

2024-03-14

Somone just told me they know several people who like guacamole but dislike avocado and such people do not exist, I assert. Please boost, I need to find such a person.
#guacamole #is #avocado! #tiny #bits of #tomato & #some #lime #does #not #change #its #taste #which is #slimy & #gross I #assert #green #goddess #dressing is #okay #though #what #are #your #thoughts

Avocados, whole and split. The center pit is still in place in one half of one. They sit on a wooden table.
2024-02-20

Почему проверять результат вызова malloc c помощью assert плохая идея

Указатель, который вернула функция malloc, необходимо проверить перед использованием. Неправильным решением будет использовать для этого макрос assert. В этой статье мы разберём, почему это является антипаттерном.

habr.com/ru/companies/pvs-stud

#malloc #assert #макросы #си #си++ #c #c++ #качество_кода #нулевые_указатели

Katharine O'Moore-Klopf, ELSKOKEdit
2024-02-13

Why do some of and for think they should not themselves and set and ? Humans are not robots. They can only do so much work each day. Stand up for yourself!

2023-09-22

Any of my tech friends and colleague have an answer for Simon here?

mathstodon.xyz/statuses/111108

I *think* the question is:

"In #gdb, how do you find the stack from number of a failing #assert ?"

#C

CC: @SimonTatham@hackyderm.io

Stephan EggermontStOnSoftware
2023-08-29

Show us your projects: Dave Mason on some TDD improvements made possible by having the code rewrite engine included: rewrite : to :equals:

Title slideAfter replacing the first try:The second try: gets the results replaced
2023-07-21

Python's assert is in a very awkward position.

It's a concise keyword for a very common type of validation, but it gets ignored if Python is run in optimised mode. However no one really runs Python in optimised mode so there are arguments on both sides about whether or not you should use assert.

Personally I also dislike that it always throws an AssertionError, so you can't use custom error types for the sake of user friendliness.

More info: docs.python.org/3/reference/si

#python #assert

Susan Larson ♀️🏳️‍🌈🏳️‍⚧️🌈Susan_Larson_TN@mastodon.online
2023-06-14

#Gay at Work: #Queer #People and the #Labor #movement

As a former #labor #organizer, I've been filled with a lot of #hope seeing #workers #standup to their #bosses and #assert their #rights in their #workplaces - especially #queer and #trans workers, without whom the current #surge in the #labormovement simply would not be possible.

#Women #Transgender #LGBTQ #LGBTQIA #Business #Workplace #Unions

autostraddle.com/gay-at-work-q

Madeleine Begun KaneMadKane@mas.to
2023-03-28

Here's my #Limerick about some bad career advice I received back in the '70s. Fortunately, I ignored it.
(I'm using the #MicroPrompt #Assert.)

"You aren't assertive enough,"
Warned a lawyer. "You need to be tough
To make it in law.
You've a terrible flaw,
So nix law school. You lack the right stuff!"

#Career #Law #Lawyers #Advice #Limericks #Rhyme #Poetry #TinyPoems #SmallPoems #Poets #Prompts #Prompt #WritingPrompt #Poem #AmWriting #MicroPoetry #Writing #WritingCommunity #PoetryCommunity

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst